This markdown file contains the script and figures used in the statistical analysis for my Infectious Diseases honours research project at the University of Edinburgh.

1 Load packages and import data

rm(list = ls())
# Load Packages

library(vegan)
library(phyloseq)
library(ggplot2)
library(plyr)
library(dplyr)
library(tibble)
library(fpc)
library(tidyr)
library(gridExtra)
library(Hmisc)
library(grid)
library(metagenomeSeq)
library(ggpubr)
library(decontam)
library(wesanderson)
library(pairwiseAdonis)
library(EnhancedVolcano)
library(FSA)
library(xtable)
library(forcats)

italic <- function(x){
  paste("\textit{",
        x,
        "}")
}

2 Data Preparation

# Read in Data
ps <- readRDS("phyloseq_object.rds")
ps_filtered_old <- readRDS("ps_filtered.rds")
ps_filtered <- readRDS("ps_filtered_march.rds")

ps
## phyloseq-class experiment-level object
## otu_table()   OTU Table:         [ 837 taxa and 56 samples ]
## sample_data() Sample Data:       [ 56 samples by 8 sample variables ]
## tax_table()   Taxonomy Table:    [ 837 taxa by 7 taxonomic ranks ]
## refseq()      DNAStringSet:      [ 837 reference sequences ]
ps_filtered
## phyloseq-class experiment-level object
## otu_table()   OTU Table:         [ 249 taxa and 53 samples ]
## sample_data() Sample Data:       [ 53 samples by 8 sample variables ]
## tax_table()   Taxonomy Table:    [ 249 taxa by 8 taxonomic ranks ]
## refseq()      DNAStringSet:      [ 249 reference sequences ]
# remove old ASV column from updated ps, try to reassign new taxonomy table with only new ASV
tax_species <- data.frame(tax_table(ps_filtered)) %>%
  select(-c(7)) %>%
  rename(ASV=ASV.1)
  
tax_table(ps_filtered) <- as.matrix(tax_species)
head(tax_table(ps_filtered))
## Taxonomy Table:     [6 taxa by 7 taxonomic ranks]:
##                Kingdom    Phylum           Class                
## Tepidimonas_1  "Bacteria" "Proteobacteria" "Gammaproteobacteria"
## Curvibacter_2  "Bacteria" "Proteobacteria" "Gammaproteobacteria"
## Thermus_3      "Bacteria" "Deinococcota"   "Deinococci"         
## Schlegelella_4 "Bacteria" "Proteobacteria" "Gammaproteobacteria"
## Thermus_5      "Bacteria" "Deinococcota"   "Deinococci"         
## Caulobacter_6  "Bacteria" "Proteobacteria" "Alphaproteobacteria"
##                Order             Family             Genus         
## Tepidimonas_1  "Burkholderiales" "Comamonadaceae"   "Tepidimonas" 
## Curvibacter_2  "Burkholderiales" "Comamonadaceae"   "Curvibacter" 
## Thermus_3      "Thermales"       "Thermaceae"       "Thermus"     
## Schlegelella_4 "Burkholderiales" "Comamonadaceae"   "Schlegelella"
## Thermus_5      "Thermales"       "Thermaceae"       "Thermus"     
## Caulobacter_6  "Caulobacterales" "Caulobacteraceae" "Caulobacter" 
##                ASV             
## Tepidimonas_1  "Tepidimonas_1" 
## Curvibacter_2  "Curvibacter_2" 
## Thermus_3      "Thermus_3"     
## Schlegelella_4 "Schlegelella_4"
## Thermus_5      "Thermus_5"     
## Caulobacter_6  "Caulobacter_6"
# visualise data
sample_names(ps)
##  [1] "BLANK1-2"     "BLANK10-2"    "BLANK11-1"    "BLANK12-2"    "BLANK13-1"   
##  [6] "BLANK2-1"     "BLANK3-1"     "BLANK4-1"     "BLANK5-2"     "BLANK6-1"    
## [11] "BLANK7-2"     "BLANK8-1"     "BLANK9-2"     "STGG1"        "STGG10"      
## [16] "STGG11"       "STGG12"       "STGG13"       "STGG14"       "STGG15"      
## [21] "STGG16"       "STGG17"       "STGG18"       "STGG19"       "STGG2"       
## [26] "STGG20"       "STGG3"        "STGG4"        "STGG5"        "STGG6"       
## [31] "STGG7"        "STGG8"        "STGG9"        "B1_E6"        "B1_E7"       
## [36] "B2_E3"        "B2_E4"        "B2_E5"        "Blank_523_1a" "Blank_523_1b"
## [41] "B1_E8"        "B1_E9"        "B2_E7"        "Blank_523_2a" "B1_E11"      
## [46] "B2_E10"       "B2_E12"       "RNAprot_1_1"  "RNAprot_2_1"  "RNAprot_3_1" 
## [51] "B1_E13"       "B1_E4"        "RNAprot_1_2"  "RNAprot_2_2"  "RNAprot_3_2" 
## [56] "RNAprot_4"
rank_names(ps)
## [1] "Kingdom" "Phylum"  "Class"   "Order"   "Family"  "Genus"   "ASV"
sample_variables(ps)
## [1] "Sample_type"     "Ct.value"        "X16s_conc_pg_ul" "Run_No"         
## [5] "PicoGreen"       "Extraction_date" "qPCR_date"       "Extracno"
# visualise data
sample_names(ps_filtered)
##  [1] "BLANK1-2"    "BLANK10-2"   "BLANK11-1"   "BLANK12-2"   "BLANK13-1"  
##  [6] "BLANK2-1"    "BLANK3-1"    "BLANK4-1"    "BLANK5-2"    "BLANK6-1"   
## [11] "BLANK7-2"    "BLANK8-1"    "BLANK9-2"    "STGG1"       "STGG10"     
## [16] "STGG11"      "STGG12"      "STGG13"      "STGG14"      "STGG15"     
## [21] "STGG16"      "STGG17"      "STGG18"      "STGG19"      "STGG2"      
## [26] "STGG20"      "STGG3"       "STGG4"       "STGG5"       "STGG6"      
## [31] "STGG7"       "STGG8"       "STGG9"       "B1_E6"       "B1_E7"      
## [36] "B2_E3"       "B2_E4"       "B2_E5"       "B1_E8"       "B1_E9"      
## [41] "B2_E7"       "B1_E11"      "B2_E10"      "B2_E12"      "RNAprot_1_1"
## [46] "RNAprot_2_1" "RNAprot_3_1" "B1_E13"      "B1_E4"       "RNAprot_1_2"
## [51] "RNAprot_2_2" "RNAprot_3_2" "RNAprot_4"
rank_names(ps_filtered)
## [1] "Kingdom" "Phylum"  "Class"   "Order"   "Family"  "Genus"   "ASV"
sample_variables(ps_filtered)
## [1] "Sample_type"     "Ct.value"        "X16s_conc_pg_ul" "Run_No"         
## [5] "PicoGreen"       "Extraction_date" "qPCR_date"       "Extracno"
#Remove PCR_blanks from PS
ps <- subset_samples(ps, !(Sample_type %in% "pcr_blank"))

#Extract meta, taxa and OTU data for Future statistical analysis
metadata <- data.frame(sample_data(ps))
metadata_filtered <- data.frame(sample_data(ps_filtered))
otu_filtered <- data.frame(otu_table(ps_filtered))
tax_filtered <- data.frame(tax_table(ps_filtered))

# Number of samples in each sample type
plyr::count(metadata_filtered, "Sample_type")
##   Sample_type freq
## 1       blank   26
## 2 rna_protect    7
## 3        stgg   20

3 Alpha Diversity

3.1 Visualise a range of alpha diversity measures and choose appropriate measure

# Visualise Alpha-diversity
plot_richness(ps, x="Sample_type") +
  geom_boxplot()
## Warning in estimate_richness(physeq, split = TRUE, measures = measures): The data you have provided does not have
## any singletons. This is highly suspicious. Results of richness
## estimates (for example) are probably unreliable, or wrong, if you have already
## trimmed low-abundance taxa from the data.
## 
## We recommended that you find the un-trimmed data and retry.

plot_richness(ps, measures = c("Observed", "Shannon"), x="Sample_type")+
  geom_boxplot()
## Warning in estimate_richness(physeq, split = TRUE, measures = measures): The data you have provided does not have
## any singletons. This is highly suspicious. Results of richness
## estimates (for example) are probably unreliable, or wrong, if you have already
## trimmed low-abundance taxa from the data.
## 
## We recommended that you find the un-trimmed data and retry.

3.2 Create matrix of alpha diversity measures

# data frame containing a number of alpha diversity estimates using "estimate_richness()"
rich = estimate_richness(ps)
## Warning in estimate_richness(ps): The data you have provided does not have
## any singletons. This is highly suspicious. Results of richness
## estimates (for example) are probably unreliable, or wrong, if you have already
## trimmed low-abundance taxa from the data.
## 
## We recommended that you find the un-trimmed data and retry.

3.3 Plot Observed Alpha Diversity

#Assign Observed index to Sample data column
ps@sam_data$observed_index <- rich$Observed

#Plot Observed Index
ggplot(ps@sam_data, aes(x=Sample_type, y=observed_index, fill=Sample_type))+
  stat_boxplot(geom = "errorbar", width = 0.25)+
  geom_boxplot()+
  scale_fill_manual(name = "Sample Type", labels = c("Blank", "RNA protect", "STGG"), values = wes_palette(n=3, name = "FantasticFox1"))+
  scale_x_discrete(label=c("Blank", "RNA protect", "STGG"))+
  #geom_dotplot(binaxis = 'y', stackdir='center', dotsize = 1)+
  geom_jitter(shape=16, position=position_jitter(0.2))+
  xlab("Sample Type")+
  ylab("Alpha Diversity (Observed)")+
  #ggtitle("Alpha Diversity (Observed) of STGG, RNA Protect and Environmental Blank Samples") +
  theme_bw()+
  ggsave("Alpha_Diversity_Observed_BP.pdf", units="in", width=8, height=5, dpi=300)

Alpha diversity, as measured by the number of species observed in each sample, appears relatively similar between samples from RNA Protect storage media and environmental controls, but elevated in STGG samples.

3.4 Determine statistical significance of these differences

#Assess distribution of Observed index values
hist(rich$Observed)

#Data is normally distributed so one-way ANOVA can be used (extracted df required)
alpha_df <- data.frame(sample_data(ps))
m1 <- aov(observed_index~Sample_type, alpha_df)
plot(m1)

summary(m1)
##             Df Sum Sq Mean Sq F value   Pr(>F)    
## Sample_type  2   6576    3288   9.273 0.000376 ***
## Residuals   50  17729     355                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Perform tukey HSD post Hoc test to identify difference between groups
m1.tukey <- TukeyHSD(m1, conf.level = 0.95)
m1.tukey
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = observed_index ~ Sample_type, data = alpha_df)
## 
## $Sample_type
##                        diff         lwr      upr     p adj
## rna_protect-blank  4.445055 -14.9220887 23.81220 0.8447139
## stgg-blank        23.730769  10.2031447 37.25839 0.0002823
## stgg-rna_protect  19.285714  -0.6881531 39.25958 0.0604822

Further analysis was preformed to determine whether the differences indicated by the boxplot were statistically significant. Observed alpha diversity data was normally distributed so one-way ANOVA was used. Results showed a significant difference in alpha diversity between sample types (p-value <0.05) and so the null hypothesis that observed alpha diversity dose not differ significantly between samples was rejected. Post-hoc analysis using a Tukey’s honestly significant difference (HSD) test supported a significant difference between STGG samples and environmental controls, whilst also indicating a small, statistically insignificant, difference between STGG and RNa Protect sample (p-value=0.06).

3.5 Plot Shannon Index

#Assign Shannon index to sample data column
ps@sam_data$shannon_index <- rich$Shannon

#Plot Shannon Index
ggplot(ps@sam_data, aes(Sample_type, shannon_index, fill=Sample_type))+
  stat_boxplot(geom = "errorbar", width = 0.25)+
  geom_boxplot()+
  scale_fill_manual(name = "Sample Type", labels = c("Blank", "RNA protect", "STGG"), values = wes_palette(n=3, name = "FantasticFox1"))+
  scale_x_discrete(label=c("Blank", "RNA protect", "STGG"))+
  #geom_dotplot(binaxis = 'y', stackdir='center', dotsize = 1)+
  geom_jitter(shape=16, position=position_jitter(0.2))+
  xlab("Sample Type")+
  ylab("Alpha Diversity (Shannon Index)")+
  ggtitle("Alpha Diversity (Shannon) of STGG, RNA Protect and Environmental Controls")+
  ggsave("Alpha_Diversity_Shannon_BP.pdf", units="in", width=8, height=5, dpi=300)

Alpha diversity was also assessed using the Shannon-Weiner diversity index. A boxplot indicated that shannon index was similar in all sample types.

#Assess distribution of data
hist(rich$Shannon)

ggdensity(rich$Shannon,
          main = "Density of Shannon Index",
          xlab = "Shannon Index")

ggqqplot(rich$Shannon)

shapiro.test(rich$Shannon)
## 
##  Shapiro-Wilk normality test
## 
## data:  rich$Shannon
## W = 0.92555, p-value = 0.002717
#Log Transform data to normal distribution
ps@sam_data$logShannon <- log10(max(rich$Shannon+1) - rich$Shannon)
hist(ps@sam_data$logShannon)

#Plot Shannon Index
ggplot(ps@sam_data, aes(x=Sample_type, y=logShannon, fill=Sample_type))+
  stat_boxplot(geom = "errorbar", width = 0.25)+
  geom_boxplot()+
  scale_fill_manual(name = "Sample Type", labels = c("Blank", "RNA protect", "STGG"), values = wes_palette(n=3, name = "FantasticFox1"))+
  scale_x_discrete(label=c("Blank", "RNA protect", "STGG"))+
  #geom_dotplot(binaxis = 'y', stackdir='center', dotsize = 1)+
  geom_jitter(shape=16, position=position_jitter(0.2))+
  xlab("Sample Type")+
  ylab("log10(Shannon Index)")+
  #ggtitle("Alpha Diversity (Shannon) of STGG, RNA Protect and Environmental Controls")+
  theme_bw()+
  ggsave("Alpha_Diversity_Shannon_BP.pdf", units="in", width=8, height=5, dpi=300)

#Data appears normally distributed, so one-way ANOVA can be used (extract df)
alpha_df <- data.frame(sample_data(ps))
m2 <- aov(logShannon ~ Sample_type, alpha_df)
plot(m2)

summary(m2)
##             Df Sum Sq  Mean Sq F value Pr(>F)
## Sample_type  2 0.0002 0.000076   0.006  0.994
## Residuals   50 0.5845 0.011690

Visualization of the Shannon index data showed that a log transformation was required to achieve normal distribution. One-way ANOVA was then performed using the transformed data. Results confirmed that Shannon diversity did not differ significantly between sample types (p-value = 0.99).

4 Beta Diversity

4.1 Calulate Bray-curtis dissimilarity measure to compare between sample diversity

#Calculate Bray-curtis dissimilarity matrix to determine between sample diversity
BrayDist <- distance(ps_filtered, method = "bray")

4.2 Ordination Plot with Elipses

#set seed
set.seed(10)

#run ordination
ordBC=metaMDS(t(otu_filtered), "bray", trymax=10, k=2, trace = TRUE)
## Square root transformation
## Wisconsin double standardization
## Run 0 stress 0.1630296 
## Run 1 stress 0.1630297 
## ... Procrustes: rmse 0.0001180338  max resid 0.0005637128 
## ... Similar to previous best
## Run 2 stress 0.1773396 
## Run 3 stress 0.1771399 
## Run 4 stress 0.1804299 
## Run 5 stress 0.1686418 
## Run 6 stress 0.1789631 
## Run 7 stress 0.1680866 
## Run 8 stress 0.1785171 
## Run 9 stress 0.1749398 
## Run 10 stress 0.1715284 
## Run 11 stress 0.176384 
## Run 12 stress 0.1694593 
## Run 13 stress 0.1809399 
## Run 14 stress 0.171529 
## Run 15 stress 0.1630296 
## ... New best solution
## ... Procrustes: rmse 3.545775e-05  max resid 0.0001299901 
## ... Similar to previous best
## Run 16 stress 0.1641474 
## Run 17 stress 0.1726666 
## Run 18 stress 0.1696494 
## Run 19 stress 0.1640934 
## Run 20 stress 0.1630348 
## ... Procrustes: rmse 0.001221239  max resid 0.006546905 
## ... Similar to previous best
## *** Solution reached
#plot samples as points in a 2D space and draw elypses around each group according to "group"
nMDS <- data.frame(NMDS1=ordBC$points[,1], NMDS2=ordBC$points[,2], group= as.factor(metadata_filtered$Sample_type), MiSeq_Run= as.factor(metadata_filtered$Run_No))

df_ellipse <- data.frame()
veganCovEllipse<-function (cov, center = c(0, 0), scale = 1, npoints = 100) 
{
  theta <- (0:npoints) * 2 * pi/npoints
  Circle <- cbind(cos(theta), sin(theta))
  t(center + scale * t(Circle %*% chol(cov)))
}

for(i in 1:length(levels(nMDS$group))) {
  df_ellipse <- rbind(df_ellipse, cbind(as.data.frame(with(nMDS[nMDS$group==levels(nMDS$group)[i],],
                                                           veganCovEllipse(cov.wt(cbind(NMDS1,NMDS2),wt=rep(1/length(NMDS1),length(NMDS1)))$cov, center=c(mean(NMDS1),mean(NMDS2))))),group=levels(nMDS$group)[i]))
}

ggplot(data=nMDS, aes(NMDS1, NMDS2)) +
         geom_polygon(data=df_ellipse, aes(x=NMDS1, y=NMDS2, fill=group), alpha=.5,show.legend = F) +
         geom_point(aes(colour = group, shape= MiSeq_Run), size=2) +
         scale_color_discrete(name="Sample Type", labels=c("Blank", "RNA Protect", "STGG"))+
  scale_shape_discrete(name = "Sequencing Run")

  theme_bw()
## List of 93
##  $ line                      :List of 6
##   ..$ colour       : chr "black"
##   ..$ size         : num 0.5
##   ..$ linetype     : num 1
##   ..$ lineend      : chr "butt"
##   ..$ arrow        : logi FALSE
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_line" "element"
##  $ rect                      :List of 5
##   ..$ fill         : chr "white"
##   ..$ colour       : chr "black"
##   ..$ size         : num 0.5
##   ..$ linetype     : num 1
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_rect" "element"
##  $ text                      :List of 11
##   ..$ family       : chr ""
##   ..$ face         : chr "plain"
##   ..$ colour       : chr "black"
##   ..$ size         : num 11
##   ..$ hjust        : num 0.5
##   ..$ vjust        : num 0.5
##   ..$ angle        : num 0
##   ..$ lineheight   : num 0.9
##   ..$ margin       : 'margin' num [1:4] 0points 0points 0points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : logi FALSE
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ title                     : NULL
##  $ aspect.ratio              : NULL
##  $ axis.title                : NULL
##  $ axis.title.x              :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : NULL
##   ..$ vjust        : num 1
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 2.75points 0points 0points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ axis.title.x.top          :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : NULL
##   ..$ vjust        : num 0
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 0points 0points 2.75points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ axis.title.x.bottom       : NULL
##  $ axis.title.y              :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : NULL
##   ..$ vjust        : num 1
##   ..$ angle        : num 90
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 0points 2.75points 0points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ axis.title.y.left         : NULL
##  $ axis.title.y.right        :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : NULL
##   ..$ vjust        : num 0
##   ..$ angle        : num -90
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 0points 0points 0points 2.75points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ axis.text                 :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : chr "grey30"
##   ..$ size         : 'rel' num 0.8
##   ..$ hjust        : NULL
##   ..$ vjust        : NULL
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : NULL
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ axis.text.x               :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : NULL
##   ..$ vjust        : num 1
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 2.2points 0points 0points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ axis.text.x.top           :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : NULL
##   ..$ vjust        : num 0
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 0points 0points 2.2points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ axis.text.x.bottom        : NULL
##  $ axis.text.y               :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : num 1
##   ..$ vjust        : NULL
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 0points 2.2points 0points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ axis.text.y.left          : NULL
##  $ axis.text.y.right         :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : num 0
##   ..$ vjust        : NULL
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 0points 0points 0points 2.2points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ axis.ticks                :List of 6
##   ..$ colour       : chr "grey20"
##   ..$ size         : NULL
##   ..$ linetype     : NULL
##   ..$ lineend      : NULL
##   ..$ arrow        : logi FALSE
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_line" "element"
##  $ axis.ticks.x              : NULL
##  $ axis.ticks.x.top          : NULL
##  $ axis.ticks.x.bottom       : NULL
##  $ axis.ticks.y              : NULL
##  $ axis.ticks.y.left         : NULL
##  $ axis.ticks.y.right        : NULL
##  $ axis.ticks.length         : 'simpleUnit' num 2.75points
##   ..- attr(*, "unit")= int 8
##  $ axis.ticks.length.x       : NULL
##  $ axis.ticks.length.x.top   : NULL
##  $ axis.ticks.length.x.bottom: NULL
##  $ axis.ticks.length.y       : NULL
##  $ axis.ticks.length.y.left  : NULL
##  $ axis.ticks.length.y.right : NULL
##  $ axis.line                 : list()
##   ..- attr(*, "class")= chr [1:2] "element_blank" "element"
##  $ axis.line.x               : NULL
##  $ axis.line.x.top           : NULL
##  $ axis.line.x.bottom        : NULL
##  $ axis.line.y               : NULL
##  $ axis.line.y.left          : NULL
##  $ axis.line.y.right         : NULL
##  $ legend.background         :List of 5
##   ..$ fill         : NULL
##   ..$ colour       : logi NA
##   ..$ size         : NULL
##   ..$ linetype     : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_rect" "element"
##  $ legend.margin             : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points
##   ..- attr(*, "unit")= int 8
##  $ legend.spacing            : 'simpleUnit' num 11points
##   ..- attr(*, "unit")= int 8
##  $ legend.spacing.x          : NULL
##  $ legend.spacing.y          : NULL
##  $ legend.key                :List of 5
##   ..$ fill         : chr "white"
##   ..$ colour       : logi NA
##   ..$ size         : NULL
##   ..$ linetype     : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_rect" "element"
##  $ legend.key.size           : 'simpleUnit' num 1.2lines
##   ..- attr(*, "unit")= int 3
##  $ legend.key.height         : NULL
##  $ legend.key.width          : NULL
##  $ legend.text               :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : 'rel' num 0.8
##   ..$ hjust        : NULL
##   ..$ vjust        : NULL
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : NULL
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ legend.text.align         : NULL
##  $ legend.title              :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : num 0
##   ..$ vjust        : NULL
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : NULL
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ legend.title.align        : NULL
##  $ legend.position           : chr "right"
##  $ legend.direction          : NULL
##  $ legend.justification      : chr "center"
##  $ legend.box                : NULL
##  $ legend.box.just           : NULL
##  $ legend.box.margin         : 'margin' num [1:4] 0cm 0cm 0cm 0cm
##   ..- attr(*, "unit")= int 1
##  $ legend.box.background     : list()
##   ..- attr(*, "class")= chr [1:2] "element_blank" "element"
##  $ legend.box.spacing        : 'simpleUnit' num 11points
##   ..- attr(*, "unit")= int 8
##  $ panel.background          :List of 5
##   ..$ fill         : chr "white"
##   ..$ colour       : logi NA
##   ..$ size         : NULL
##   ..$ linetype     : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_rect" "element"
##  $ panel.border              :List of 5
##   ..$ fill         : logi NA
##   ..$ colour       : chr "grey20"
##   ..$ size         : NULL
##   ..$ linetype     : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_rect" "element"
##  $ panel.spacing             : 'simpleUnit' num 5.5points
##   ..- attr(*, "unit")= int 8
##  $ panel.spacing.x           : NULL
##  $ panel.spacing.y           : NULL
##  $ panel.grid                :List of 6
##   ..$ colour       : chr "grey92"
##   ..$ size         : NULL
##   ..$ linetype     : NULL
##   ..$ lineend      : NULL
##   ..$ arrow        : logi FALSE
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_line" "element"
##  $ panel.grid.major          : NULL
##  $ panel.grid.minor          :List of 6
##   ..$ colour       : NULL
##   ..$ size         : 'rel' num 0.5
##   ..$ linetype     : NULL
##   ..$ lineend      : NULL
##   ..$ arrow        : logi FALSE
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_line" "element"
##  $ panel.grid.major.x        : NULL
##  $ panel.grid.major.y        : NULL
##  $ panel.grid.minor.x        : NULL
##  $ panel.grid.minor.y        : NULL
##  $ panel.ontop               : logi FALSE
##  $ plot.background           :List of 5
##   ..$ fill         : NULL
##   ..$ colour       : chr "white"
##   ..$ size         : NULL
##   ..$ linetype     : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_rect" "element"
##  $ plot.title                :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : 'rel' num 1.2
##   ..$ hjust        : num 0
##   ..$ vjust        : num 1
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 0points 0points 5.5points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ plot.title.position       : chr "panel"
##  $ plot.subtitle             :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : num 0
##   ..$ vjust        : num 1
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 0points 0points 5.5points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ plot.caption              :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : 'rel' num 0.8
##   ..$ hjust        : num 1
##   ..$ vjust        : num 1
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 5.5points 0points 0points 0points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ plot.caption.position     : chr "panel"
##  $ plot.tag                  :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : 'rel' num 1.2
##   ..$ hjust        : num 0.5
##   ..$ vjust        : num 0.5
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : NULL
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ plot.tag.position         : chr "topleft"
##  $ plot.margin               : 'margin' num [1:4] 5.5points 5.5points 5.5points 5.5points
##   ..- attr(*, "unit")= int 8
##  $ strip.background          :List of 5
##   ..$ fill         : chr "grey85"
##   ..$ colour       : chr "grey20"
##   ..$ size         : NULL
##   ..$ linetype     : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_rect" "element"
##  $ strip.background.x        : NULL
##  $ strip.background.y        : NULL
##  $ strip.placement           : chr "inside"
##  $ strip.text                :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : chr "grey10"
##   ..$ size         : 'rel' num 0.8
##   ..$ hjust        : NULL
##   ..$ vjust        : NULL
##   ..$ angle        : NULL
##   ..$ lineheight   : NULL
##   ..$ margin       : 'margin' num [1:4] 4.4points 4.4points 4.4points 4.4points
##   .. ..- attr(*, "unit")= int 8
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ strip.text.x              : NULL
##  $ strip.text.y              :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : NULL
##   ..$ vjust        : NULL
##   ..$ angle        : num -90
##   ..$ lineheight   : NULL
##   ..$ margin       : NULL
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  $ strip.switch.pad.grid     : 'simpleUnit' num 2.75points
##   ..- attr(*, "unit")= int 8
##  $ strip.switch.pad.wrap     : 'simpleUnit' num 2.75points
##   ..- attr(*, "unit")= int 8
##  $ strip.text.y.left         :List of 11
##   ..$ family       : NULL
##   ..$ face         : NULL
##   ..$ colour       : NULL
##   ..$ size         : NULL
##   ..$ hjust        : NULL
##   ..$ vjust        : NULL
##   ..$ angle        : num 90
##   ..$ lineheight   : NULL
##   ..$ margin       : NULL
##   ..$ debug        : NULL
##   ..$ inherit.blank: logi TRUE
##   ..- attr(*, "class")= chr [1:2] "element_text" "element"
##  - attr(*, "class")= chr [1:2] "theme" "gg"
##  - attr(*, "complete")= logi TRUE
##  - attr(*, "validate")= logi TRUE
  #ggsave("Ordination_Plot_with_Elypses.pdf", units="in", width=8, height=5, dpi=300)

To investigate whether the diversity between samples varied with sample type, beta diversity was calculated using the Bray-Curtis dissimilarity measure. To visualise this highly dimensional data, non-metric multidimensional scaling (nMDS) was used to plot the samples in a two dimensional space with elypses around each sample type. Data points were also coloured according to Sample Type and assigned a shape in relation to the MiSeq run as shown in the legend. Ordination showed a dissimilarity in beta diversity between STGG and control samples. RNA Samples also appeared to differ with STGG samples, however appeared similar to control samples.

A strong distinction between samples from each MiSeq run was also observed, with samples from the same run appearing similar, whilst samples from different runs showing a strong dissimilarity.

4.3 Determine Statistical Significance using PERMANOVA

#Use Permanova to determine any statistical differences in beta diversity between sample_types
perm1 <- adonis(BrayDist ~ Sample_type + Run_No, data = metadata_filtered)
perm1
## 
## Call:
## adonis(formula = BrayDist ~ Sample_type + Run_No, data = metadata_filtered) 
## 
## Permutation: free
## Number of permutations: 999
## 
## Terms added sequentially (first to last)
## 
##             Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
## Sample_type  2    5.1014  2.5507  13.246 0.28228  0.001 ***
## Run_No       1    3.5349  3.5349  18.357 0.19560  0.001 ***
## Residuals   49    9.4358  0.1926         0.52212           
## Total       52   18.0720                 1.00000           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
print(xtable(perm1$aov.tab, type = "latex", digits = 3), file = "Beta_PERMANOVA1.tex")

perm2 <- adonis(BrayDist ~ Run_No, data = metadata_filtered, )
perm2
## 
## Call:
## adonis(formula = BrayDist ~ Run_No, data = metadata_filtered) 
## 
## Permutation: free
## Number of permutations: 999
## 
## Terms added sequentially (first to last)
## 
##           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
## Run_No     1    6.1064  6.1064  26.027 0.33789  0.001 ***
## Residuals 51   11.9657  0.2346         0.66211           
## Total     52   18.0720                 1.00000           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Perform post-hoc analysis to determine between which groups is this difference is occurring
library(devtools)
#install_github("pmartinezarbizu/pairwiseAdonis/pairwiseAdonis")

perm1.2 <- pairwise.adonis(BrayDist, factors = metadata_filtered$Sample_type, p.adjust.m = 'holm')
perm1.2
##                  pairs Df SumsOfSqs   F.Model         R2 p.value p.adjusted sig
## 1        blank vs stgg  1 3.7369290 14.111591 0.24283608   0.001      0.003   *
## 2 blank vs rna_protect  1 0.6168048  1.898596 0.05771053   0.080      0.080    
## 3  stgg vs rna_protect  1 2.8932695 17.146252 0.40682744   0.001      0.003   *
print(xtable(perm1.2, type = "latex", digits = 3), file = "Beta_PERMANOVA1.2.tex")

These observations were supported by results from permutational multivariate analysis of variance (PERMANOVA). The dissimilarity between groups was shown to be statistically significant (p-value<0.05), and post-hoc analysis with pairwiseAdonis showed this dissimilarity between Blank and STGG samples (adjusted p-value<0.05) but not between Blank and RNA Protect samples (adjusted p-value<0.05). Results also showed a significant dissimilarity between STGG and RNA Protect Samples (adjusted p-value<0.05).

A significant difference between samples from MiSeq run 514 and 523 was also observed (p-value<0.05).

4.4 Beta Diversity of each sample type in Run_No 523

As the NMDS plot had shown a significant difference in beta diversity between MiSeq runs, further analysis was conducted to investigate how beta diversity compared between sample types in each run.

ps_filtered523 <- subset_samples(ps_filtered, !(Run_No %in% "514"))
ps_filtered523 <- prune_taxa(taxa_sums(ps_filtered523) > 0, ps_filtered523)


#Calculate Bray-curtis dissimilarity matrix to determine between sample diversity
BrayDist523 <- distance(ps_filtered523, method = "bray")

#Extract Meta data and OTU
metadata523 <- data.frame(sample_data(ps_filtered523))
otu_523 <- data.frame(otu_table(ps_filtered523))

#set seed
set.seed(10)

#run ordination
ordBC523=metaMDS(t(otu_523), "bray", trymax=10, k=2, trace = TRUE)
## Square root transformation
## Wisconsin double standardization
## Run 0 stress 0.1063271 
## Run 1 stress 0.1057221 
## ... New best solution
## ... Procrustes: rmse 0.04905362  max resid 0.1079511 
## Run 2 stress 0.1081985 
## Run 3 stress 0.1073357 
## Run 4 stress 0.1058492 
## ... Procrustes: rmse 0.04373376  max resid 0.1024493 
## Run 5 stress 0.1056089 
## ... New best solution
## ... Procrustes: rmse 0.02119661  max resid 0.07130839 
## Run 6 stress 0.1066134 
## Run 7 stress 0.1081577 
## Run 8 stress 0.1056088 
## ... New best solution
## ... Procrustes: rmse 0.0001494597  max resid 0.0005017097 
## ... Similar to previous best
## Run 9 stress 0.1059444 
## ... Procrustes: rmse 0.05056411  max resid 0.1084485 
## Run 10 stress 0.1073359 
## Run 11 stress 0.1059451 
## ... Procrustes: rmse 0.05054034  max resid 0.1083398 
## Run 12 stress 0.1056088 
## ... New best solution
## ... Procrustes: rmse 0.0001216241  max resid 0.0002212386 
## ... Similar to previous best
## Run 13 stress 0.105849 
## ... Procrustes: rmse 0.05047258  max resid 0.1031852 
## Run 14 stress 0.1059445 
## ... Procrustes: rmse 0.05056571  max resid 0.1084993 
## Run 15 stress 0.1064428 
## Run 16 stress 0.1059507 
## ... Procrustes: rmse 0.05044598  max resid 0.1083006 
## Run 17 stress 0.1057258 
## ... Procrustes: rmse 0.04779156  max resid 0.1080937 
## Run 18 stress 0.1066189 
## Run 19 stress 0.1057997 
## ... Procrustes: rmse 0.01999571  max resid 0.05825011 
## Run 20 stress 0.1063271 
## *** Solution reached
#plot samples as points in a 2D space and draw elypses around each group according to "group"
nMDS523 <- data.frame(NMDS1=ordBC523$points[,1], NMDS2=ordBC523$points[,2], group= as.factor(metadata523$Sample_type))

df_ellipse <- data.frame()
veganCovEllipse<-function (cov, center = c(0, 0), scale = 1, npoints = 100) 
{
  theta <- (0:npoints) * 2 * pi/npoints
  Circle <- cbind(cos(theta), sin(theta))
  t(center + scale * t(Circle %*% chol(cov)))
}

for(i in 1:length(levels(nMDS523$group))) {
  df_ellipse <- rbind(df_ellipse, cbind(as.data.frame(with(nMDS523[nMDS523$group==levels(nMDS523$group)[i],],
                                                           veganCovEllipse(cov.wt(cbind(NMDS1,NMDS2),wt=rep(1/length(NMDS1),length(NMDS1)))$cov, center=c(mean(NMDS1),mean(NMDS2))))),group=levels(nMDS$group)[i]))
}

ggplot(data=nMDS523, aes(NMDS1, NMDS2)) +
         geom_polygon(data=df_ellipse, aes(x=NMDS1, y=NMDS2, fill=group), alpha=.5,show.legend = F) +
         geom_point(aes(colour = group), size=2) +
         scale_color_discrete(name="Sample Type", labels=c("Blank", "RNA Protect", "STGG"))+
  theme_bw()+
  ggsave("Ordination_Plot_with_Elypses_Run523.pdf", units="in", width=5, height=3, dpi=300)

#PERMANOVA to check statistical significance
perm523 <- adonis(BrayDist523 ~ Sample_type, data = metadata523)
perm523
## 
## Call:
## adonis(formula = BrayDist523 ~ Sample_type, data = metadata523) 
## 
## Permutation: free
## Number of permutations: 999
## 
## Terms added sequentially (first to last)
## 
##             Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)  
## Sample_type  1    0.3025 0.30254  1.8856 0.09482  0.083 .
## Residuals   18    2.8881 0.16045         0.90518         
## Total       19    3.1906                 1.00000         
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
print(xtable(perm523$aov.tab, type = "latex", digits = 3), file = "Beta_PERMANOVA523.tex")

The Bray-Curtis dissimilarity measure of RNA protect and control samples from MiSeq run no. 523 was calculated and visualised using an NMDS plot. Results showed no dissimilary between RNA protect samples and environmental control blanks, which was supported by PERMANOVA results (p-value<0.05).

4.5 Beta Diversity of each sample type in Run_No 514

ps_filtered514 <- subset_samples(ps_filtered, !(Run_No %in% "523"))
ps_filtered514 <- prune_taxa(taxa_sums(ps_filtered514) > 0, ps_filtered514)

#Calculate Bray-curtis dissimilarity matrix to determine between sample diversity
BrayDist514 <- distance(ps_filtered514, method = "bray")

#Extract Meta data and OTU
metadata514 <- data.frame(sample_data(ps_filtered514))
otu_514 <- data.frame(otu_table(ps_filtered514))

#set seed
set.seed(10)

#run ordination
ordBC514=metaMDS(t(otu_514), "bray", trymax=10, k=2, trace = TRUE)
## Square root transformation
## Wisconsin double standardization
## Run 0 stress 0.2181672 
## Run 1 stress 0.2181976 
## ... Procrustes: rmse 0.1312561  max resid 0.3305768 
## Run 2 stress 0.2176561 
## ... New best solution
## ... Procrustes: rmse 0.03935621  max resid 0.1319125 
## Run 3 stress 0.2329944 
## Run 4 stress 0.2219854 
## Run 5 stress 0.2300727 
## Run 6 stress 0.2249456 
## Run 7 stress 0.2205169 
## Run 8 stress 0.2182917 
## Run 9 stress 0.2369317 
## Run 10 stress 0.2211973 
## Run 11 stress 0.217572 
## ... New best solution
## ... Procrustes: rmse 0.01432089  max resid 0.05912974 
## Run 12 stress 0.2181978 
## Run 13 stress 0.2176566 
## ... Procrustes: rmse 0.0144357  max resid 0.06171741 
## Run 14 stress 0.2234542 
## Run 15 stress 0.2161268 
## ... New best solution
## ... Procrustes: rmse 0.09848959  max resid 0.4126196 
## Run 16 stress 0.2312062 
## Run 17 stress 0.2182954 
## Run 18 stress 0.2214521 
## Run 19 stress 0.2205494 
## Run 20 stress 0.2190393 
## *** No convergence -- monoMDS stopping criteria:
##      1: no. of iterations >= maxit
##     19: stress ratio > sratmax
#plot samples as points in a 2D space and draw elypses around each group according to "group"
nMDS514 <- data.frame(NMDS1=ordBC514$points[,1], NMDS2=ordBC514$points[,2], group= as.factor(metadata514$Sample_type))

df_ellipse <- data.frame()
veganCovEllipse<-function (cov, center = c(0, 0), scale = 1, npoints = 100) 
{
  theta <- (0:npoints) * 2 * pi/npoints
  Circle <- cbind(cos(theta), sin(theta))
  t(center + scale * t(Circle %*% chol(cov)))
}

for(i in 1:length(levels(nMDS514$group))) {
  df_ellipse <- rbind(df_ellipse, cbind(as.data.frame(with(nMDS514[nMDS514$group==levels(nMDS514$group)[i],],
                                                           veganCovEllipse(cov.wt(cbind(NMDS1,NMDS2),wt=rep(1/length(NMDS1),length(NMDS1)))$cov, center=c(mean(NMDS1),mean(NMDS2))))),group=levels(nMDS$group)[i]))
}

ggplot(data=nMDS514, aes(NMDS1, NMDS2)) +
         geom_polygon(data=df_ellipse, aes(x=NMDS1, y=NMDS2, fill=group), alpha=.5,show.legend = F) +
         geom_point(aes(colour = group), size=2) +
         scale_color_discrete(name="Sample Type", labels=c("Blank", "STGG"))+
  theme_bw()+
  ggsave("Ordination_Plot_with_Elypses_Run514.pdf", units="in", width=5, height=3, dpi=300)

#PERMANOVA to check statistical significance
perm514 <- adonis(BrayDist514 ~ Sample_type, data = metadata514)
perm514
## 
## Call:
## adonis(formula = BrayDist514 ~ Sample_type, data = metadata514) 
## 
## Permutation: free
## Number of permutations: 999
## 
## Terms added sequentially (first to last)
## 
##             Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
## Sample_type  1    2.2273 2.22729  10.545 0.25382  0.001 ***
## Residuals   31    6.5477 0.21122         0.74618           
## Total       32    8.7750                 1.00000           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
print(xtable(perm514$aov.tab, type = "latex", digits = 3), file = "Beta_PERMANOVA514.tex")

The Bray-Curtis dissimilarity measure of STGG and control samples from MiSeq run no. 514 was calculated and visualised using an NMDS plot. Results showed dissimilarity between RNA protect samples and environmental control blanks. PERMANOVA found this dissimilarity to be statistically significant (p-value<0.05).

4.6 Beta Diversity of Enivronmental Blanks

ps_filtered_blanks <- ps_filtered %>%
  subset_samples(!(Sample_type %in% "stgg")) %>%
  subset_samples(!(Sample_type %in% "rna_protect"))

#Calculate Bray-curtis dissimilarity matrix to determine between sample diversity
BrayDist_blanks <- distance(ps_filtered_blanks, method = "bray")

#Extract Meta data and OTU
metadata_blanks <- data.frame(sample_data(ps_filtered_blanks))
otu_blanks <- data.frame(otu_table(ps_filtered_blanks))

#set seed
set.seed(10)

#run ordination
ordBC_blanks=metaMDS(t(otu_blanks), "bray", trymax=10, k=2, trace = TRUE)
## Square root transformation
## Wisconsin double standardization
## Run 0 stress 0.1014184 
## Run 1 stress 0.1014184 
## ... Procrustes: rmse 3.378e-06  max resid 1.208614e-05 
## ... Similar to previous best
## Run 2 stress 0.1015034 
## ... Procrustes: rmse 0.00231414  max resid 0.008759448 
## ... Similar to previous best
## Run 3 stress 0.1068923 
## Run 4 stress 0.1017015 
## ... Procrustes: rmse 0.007532322  max resid 0.02699233 
## Run 5 stress 0.1023448 
## Run 6 stress 0.1273847 
## Run 7 stress 0.1145828 
## Run 8 stress 0.1014184 
## ... Procrustes: rmse 3.603125e-06  max resid 8.917658e-06 
## ... Similar to previous best
## Run 9 stress 0.1134541 
## Run 10 stress 0.1072017 
## Run 11 stress 0.1146329 
## Run 12 stress 0.1069779 
## Run 13 stress 0.1023868 
## Run 14 stress 0.1014184 
## ... Procrustes: rmse 4.2256e-06  max resid 1.143086e-05 
## ... Similar to previous best
## Run 15 stress 0.124595 
## Run 16 stress 0.1068536 
## Run 17 stress 0.1023868 
## Run 18 stress 0.1135888 
## Run 19 stress 0.1014184 
## ... Procrustes: rmse 1.125122e-05  max resid 3.534936e-05 
## ... Similar to previous best
## Run 20 stress 0.121181 
## *** Solution reached
#plot samples as points in a 2D space and draw elypses around each group according to "group"
nMDS_blanks <- data.frame(NMDS1=ordBC_blanks$points[,1], NMDS2=ordBC_blanks$points[,2], group= as.factor(metadata_blanks$Run_No))

df_ellipse <- data.frame()
veganCovEllipse<-function (cov, center = c(0, 0), scale = 1, npoints = 100) 
{
  theta <- (0:npoints) * 2 * pi/npoints
  Circle <- cbind(cos(theta), sin(theta))
  t(center + scale * t(Circle %*% chol(cov)))
}

for(i in 1:length(levels(nMDS_blanks$group))) {
  df_ellipse <- rbind(df_ellipse, cbind(as.data.frame(with(nMDS_blanks[nMDS_blanks$group==levels(nMDS_blanks$group)[i],],
                                                           veganCovEllipse(cov.wt(cbind(NMDS1,NMDS2),wt=rep(1/length(NMDS1),length(NMDS1)))$cov, center=c(mean(NMDS1),mean(NMDS2))))),group=levels(nMDS$group)[i]))
}

ggplot(data=nMDS_blanks, aes(NMDS1, NMDS2)) +
         geom_polygon(data=df_ellipse, aes(x=NMDS1, y=NMDS2, fill=group), alpha=.5,show.legend = F) +
         geom_point(aes(colour = group), size=2) +
         scale_color_discrete(name="MiSeq Run No.", labels=c("514", "523"))+
  ggsave("Ordination_Plot_with_Elypses_Blanks.tiff", units="in", width=8, height=5, dpi=300, compression = 'lzw')

#PERMANOVA to check statistical significance
perm_blanks <- adonis(BrayDist_blanks ~ Run_No, data = metadata_blanks)
perm_blanks
## 
## Call:
## adonis(formula = BrayDist_blanks ~ Run_No, data = metadata_blanks) 
## 
## Permutation: free
## Number of permutations: 999
## 
## Terms added sequentially (first to last)
## 
##           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
## Run_No     1    3.5349  3.5349  16.261 0.40388  0.001 ***
## Residuals 24    5.2173  0.2174         0.59612           
## Total     25    8.7522                 1.00000           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

5 Stacked Bar Chart

5.1 First plot relative abundances at Phylum level

###phylum level relative abundances

phy_phylum<-tax_glom(ps_filtered, "Phylum") ##10

#Extract OTUs at phylumlevel
otu_phy<-phy_phylum%>%
  otu_table%>%
  as("matrix")%>%
  magrittr::set_rownames(paste(tax_table(phy_phylum)[,"Phylum"], seq(1:length(tax_table(phy_phylum)[,"Phylum"])), sep = "_"))%>%
  data.frame(.)

##Convert into RA
otu_phy_RA <- t(t(otu_phy)/colSums(otu_phy))

phy_table_ord <- otu_phy_RA[order(rowSums(otu_phy),decreasing=T),]
n = 10
stack.dfT_phy <- cbind(data.frame(Sample.ID=rownames(metadata_filtered)), t(phy_table_ord))%>% 
  data.frame(check.names = F)%>%
  gather(key=Phylum, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(Phylum, levels = rev(unique(Phylum))))

metadata_filtered$Sample <-rownames(metadata_filtered)

#Add Sample_type as a variable of interest
Sample_group<-metadata_filtered%>%
  select(Sample, Sample_type) %>% 
  deframe()

stack.dfT_phy$Sample_group <- Sample_group[match(stack.dfT_phy$Sample.ID, names(Sample_group))]
##overall mean abundances ,
mean_ab_groups_phy <- stack.dfT_phy%>%
  group_by(Phylum)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)%>%
  arrange(desc(mean_percentage))

write.table(mean_ab_groups_phy, file="mean_abundances_phylum_level_all.txt")
print(xtable(mean_ab_groups_phy, digits = 4, type = "latex"), file = "mean_abundances_phylum_level.tex")

##RA stratified by Group 
mean_ab_groups_phy_str<-stack.dfT_phy%>%
  group_by(ASV,Sample_group)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100,Group=ifelse(Sample_group=="blank","STGG","rna_protect"))

#color vector
col <-c("#0095e9", "#ffd500","#b452f6","#83cf00",
        "#d84e9a",
        "#01c343",
        "#ffacfe",
        "#01ad6b",
        "#ffb539",
        "#cedeff",
        "#a98c00",
        "#688794",
        "#fffe90",
        "#b66e72",
        "#b7ffe2",
        "#5e8f47",
        "#ffeeb4")
#Create facet labels 
facet_labels <- c("Blank", "RNA Protect", "STGG")

##Plot Stack Bargraph
ggplot(mean_ab_groups_phy_str, aes(x = Sample_group, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack") + 
  ylab("Relative Abundance (%)")+
  xlab("Sample Type")+
  scale_fill_manual(values = col)+
  #facet_grid(.~Sample_group, scales = "free", labeller = labeller("Blank", "RNA Protect", "STGG"))+
  scale_x_discrete(label=c("Blank", "RNA protect", "STGG"))+
  theme_bw() +
  #theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) +
ggsave("Relative_abundances_phylum_sample_type.pdf", units="in", width=8, height=5, dpi=300)

##RA stratified by Group 
mean_ab_groups_phy_sample<-stack.dfT_phy%>%
  group_by(ASV,Sample_group, Sample.ID)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100,Group=ifelse(Sample_group=="blank","STGG","rna_protect"))
##Plot Stack Bargraph
ggplot(mean_ab_groups_phy_sample, aes(x = Sample.ID, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack") + 
  ylab("Relative Abundance (%)")+
  xlab("Sample Type")+
  scale_fill_manual(values = col)+
  #facet_grid(.~Sample_group, scales = "free", labeller = labeller("Blank", "RNA Protect", "STGG"))+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5)) +
ggsave("Relative_abundances_phylum_sample.pdf", units="in", width=8, height=5, dpi=300)

A stacked bar chart was created to visualise the microbial composition of each sample type at the phylum level. Phyla are shown in relative abundance, as a percentage of the mean total counts in each sample type. At phylum level the microbial composition of each sample type appears relatively similar. Proteobacteria are the most abundant phyla in all sample types accounting for around 75% (73.96%) of microbial sequences detected in each sample. Deinococotta was the second most abundant present with an average relative abundance of around 15% (16.3%) in all sample types. Actinobateriota and Firmicutes accounted for the majority of the remaining taxa in all sample types, with average relative abundances of approximately 5% (4.64%) and 4% (4.22%).

5.1.1 Relative Abundance

RA.df_phy <- stack.dfT_phy%>%
  mutate(log10_RA=log10(RA+1))%>%
  mutate(sqrt_RA=sqrt(RA))

MiSeq_Run<-metadata_filtered%>%
  select(Sample, Run_No) %>% 
  deframe()

RA.df_phy$MiSeq_Run<-MiSeq_Run[match(RA.df_phy$Sample.ID, names(MiSeq_Run))]

5.1.1.1 Proteobacteria

ProRA <- filter(RA.df_phy, ASV=="Proteobacteria_1")
Pro1 <- lm(RA ~ Sample_group, data=ProRA)
summary(Pro1)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = ProRA)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.36812 -0.02732 -0.00449  0.03719  0.26000 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              0.74000    0.01957  37.821   <2e-16 ***
## Sample_grouprna_protect -0.01309    0.04248  -0.308    0.759    
## Sample_groupstgg         0.01331    0.02967   0.449    0.656    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.09977 on 50 degrees of freedom
## Multiple R-squared:  0.008304,   Adjusted R-squared:  -0.03136 
## F-statistic: 0.2093 on 2 and 50 DF,  p-value: 0.8118
par(mfrow=c(2,2))
plot(Pro1)

#### Deinococcota_2

DeinRA <- filter(RA.df_phy, ASV=="Deinococcota_2")
Dein2 <- lm(RA ~ Sample_group, data=DeinRA)
summary(Dein2)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = DeinRA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.155264 -0.049418  0.004759  0.047313  0.261403 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              0.155264   0.016436   9.447 1.05e-12 ***
## Sample_grouprna_protect  0.033338   0.035686   0.934    0.355    
## Sample_groupstgg        -0.009041   0.024926  -0.363    0.718    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.08381 on 50 degrees of freedom
## Multiple R-squared:  0.02597,    Adjusted R-squared:  -0.01299 
## F-statistic: 0.6665 on 2 and 50 DF,  p-value: 0.518
par(mfrow=c(2,2))
plot(Dein2)

#### Firmicutes_3

FirmRA <- filter(RA.df_phy, ASV=="Firmicutes_3")
Firm3 <- lm(RA ~ Sample_group, data=FirmRA)
summary(Firm3)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = FirmRA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.046449 -0.034023 -0.019276  0.001527  0.250426 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              0.0464494  0.0117213   3.963 0.000236 ***
## Sample_grouprna_protect -0.0118009  0.0254499  -0.464 0.644880    
## Sample_groupstgg        -0.0008598  0.0177763  -0.048 0.961617    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.05977 on 50 degrees of freedom
## Multiple R-squared:  0.004468,   Adjusted R-squared:  -0.03535 
## F-statistic: 0.1122 on 2 and 50 DF,  p-value: 0.8941
par(mfrow=c(2,2))
plot(Firm3)

#### Actinobacteriota_4

ActinRA <- filter(RA.df_phy, ASV=="Actinobacteriota_4")
Actin4 <- lm(RA ~ Sample_group, data=ActinRA)
summary(Actin4)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = ActinRA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.052625 -0.036702 -0.009335  0.008342  0.206750 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              0.052625   0.011053   4.761 1.69e-05 ***
## Sample_grouprna_protect -0.015194   0.023999  -0.633    0.530    
## Sample_groupstgg        -0.003387   0.016763  -0.202    0.841    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.05636 on 50 degrees of freedom
## Multiple R-squared:  0.007955,   Adjusted R-squared:  -0.03173 
## F-statistic: 0.2005 on 2 and 50 DF,  p-value: 0.819
par(mfrow=c(2,2))
plot(Actin4)

#### Bacteroidota_6

BacterRA <- filter(RA.df_phy, ASV=="Actinobacteriota_4")
Bacter6 <- lm(RA ~ Sample_group, data=BacterRA)
summary(Bacter6)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = BacterRA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.052625 -0.036702 -0.009335  0.008342  0.206750 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              0.052625   0.011053   4.761 1.69e-05 ***
## Sample_grouprna_protect -0.015194   0.023999  -0.633    0.530    
## Sample_groupstgg        -0.003387   0.016763  -0.202    0.841    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.05636 on 50 degrees of freedom
## Multiple R-squared:  0.007955,   Adjusted R-squared:  -0.03173 
## F-statistic: 0.2005 on 2 and 50 DF,  p-value: 0.819
par(mfrow=c(2,2))
plot(Bacter6)

#### Bdellovibrionota_5

BdellRA <- filter(RA.df_phy, ASV=="Bdellovibrionota_5")
Bdell5 <- lm(RA ~ Sample_group, data=BdellRA)
summary(Bdell5)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = BdellRA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.007736 -0.003669  0.000000  0.000000  0.015081 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              0.003669   0.001012   3.624 0.000678 ***
## Sample_grouprna_protect  0.004067   0.002198   1.850 0.070167 .  
## Sample_groupstgg        -0.003669   0.001535  -2.390 0.020674 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.005162 on 50 degrees of freedom
## Multiple R-squared:  0.2066, Adjusted R-squared:  0.1749 
## F-statistic: 6.511 on 2 and 50 DF,  p-value: 0.003069
par(mfrow=c(2,2))
plot(Bdell5)

#### Myxococcota_7

myxlRA <- filter(RA.df_phy, ASV=="Myxococcota_7")
myxl <- lm(RA ~ Sample_group, data=myxlRA)
summary(myxl)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = myxlRA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0005202 -0.0005202  0.0000000  0.0000000  0.0049146 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)   
## (Intercept)              0.0005202  0.0001796   2.897  0.00558 **
## Sample_grouprna_protect -0.0001479  0.0003899  -0.379  0.70610   
## Sample_groupstgg        -0.0005202  0.0002723  -1.910  0.06186 . 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.0009157 on 50 degrees of freedom
## Multiple R-squared:  0.06878,    Adjusted R-squared:  0.03153 
## F-statistic: 1.846 on 2 and 50 DF,  p-value: 0.1684
par(mfrow=c(2,2))
plot(myxl)

#### Acidobacteriota_8

acidoRA <- filter(RA.df_phy, ASV=="Acidobacteriota_8")
acido <- lm(RA ~ Sample_group, data=acidoRA)
summary(acido)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = acidoRA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0003258 -0.0001518 -0.0001518  0.0000000  0.0026583 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)
## (Intercept)              1.518e-04  9.777e-05   1.552    0.127
## Sample_grouprna_protect  1.740e-04  2.123e-04   0.820    0.416
## Sample_groupstgg        -1.518e-04  1.483e-04  -1.023    0.311
## 
## Residual standard error: 0.0004985 on 50 degrees of freedom
## Multiple R-squared:  0.04681,    Adjusted R-squared:  0.008687 
## F-statistic: 1.228 on 2 and 50 DF,  p-value: 0.3016
par(mfrow=c(2,2))
plot(acido)

#### Planctomycetota_9

plancRA <- filter(RA.df_phy, ASV=="Planctomycetota_9")
planc <- lm(RA ~ Sample_group, data=plancRA)
summary(planc)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = plancRA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0005695 -0.0005695  0.0000000  0.0000000  0.0088403 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)
## (Intercept)              1.366e-19  2.572e-04    0.00    1.000
## Sample_grouprna_protect -1.320e-19  5.584e-04    0.00    1.000
## Sample_groupstgg         5.695e-04  3.900e-04    1.46    0.151
## 
## Residual standard error: 0.001311 on 50 degrees of freedom
## Multiple R-squared:  0.04486,    Adjusted R-squared:  0.006656 
## F-statistic: 1.174 on 2 and 50 DF,  p-value: 0.3174
par(mfrow=c(2,2))
plot(planc)

#### Chloroflexi_10

chloroRA <- filter(RA.df_phy, ASV=="Chloroflexi_10")
chloro <- lm(RA ~ Sample_group, data=chloroRA)
summary(chloro)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = chloroRA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0003593 -0.0003593  0.0000000  0.0000000  0.0056288 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)             5.957e-20  1.634e-04    0.00    1.000
## Sample_grouprna_protect 0.000e+00  3.548e-04    0.00    1.000
## Sample_groupstgg        3.593e-04  2.478e-04    1.45    0.153
## 
## Residual standard error: 0.0008332 on 50 degrees of freedom
## Multiple R-squared:  0.04426,    Adjusted R-squared:  0.00603 
## F-statistic: 1.158 on 2 and 50 DF,  p-value: 0.3225
par(mfrow=c(2,2))
plot(chloro)

#### Adjusted P-Values

lmp <- function (modelobject) {
    if (class(modelobject) != "lm") stop("Not an object of class 'lm' ")
    f <- summary(modelobject)$fstatistic
    p <- pf(f[1],f[2],f[3],lower.tail=F)
    attributes(p) <- NULL
    return(p)
}

p.adjust(c("0.812", "0.518", "0.819", "0.894", "0.819", "0.003", "0.168", "0.317", "0.323", "0.302"), method = "BH")
##  [1] 0.8940000 0.8633333 0.8940000 0.8940000 0.8940000 0.0300000 0.6460000
##  [8] 0.6460000 0.6460000 0.6460000
phy_R2 <- c(summary(Pro1)$r.squared, summary(Dein2)$r.squared, summary(Actin4)$r.squared, summary(Firm3)$r.squared, summary(Bacter6)$r.squared, summary(Bdell5)$r.squared, summary(myxl)$r.squared, summary(planc)$r.squared, summary(chloro)$r.squared, summary(acido)$r.squared)

phy_pval <- c(lmp(Pro1), lmp(Dein2), lmp(Actin4), lmp(Firm3), lmp(Bacter6), lmp(Bdell5), lmp(myxl), lmp(planc), lmp(chloro), lmp(acido))

phy_adjpval <- p.adjust(phy_pval, method = "BH")

phy_names <- mean_ab_groups_phy$Phylum

phy_lm_table <- data.frame(phy_names, phy_R2, phy_pval, phy_adjpval)
print(phy_lm_table)
##             phy_names      phy_R2    phy_pval phy_adjpval
## 1    Proteobacteria_1 0.008303948 0.811829087  0.89407770
## 2      Deinococcota_2 0.025968192 0.517998486  0.86333081
## 3  Actinobacteriota_4 0.007954793 0.819005051  0.89407770
## 4        Firmicutes_3 0.004468490 0.894077702  0.89407770
## 5      Bacteroidota_6 0.007954793 0.819005051  0.89407770
## 6  Bdellovibrionota_5 0.206617659 0.003069469  0.03069469
## 7       Myxococcota_7 0.068778686 0.168392478  0.64495541
## 8   Planctomycetota_9 0.044861754 0.317435791  0.64495541
## 9      Chloroflexi_10 0.044259504 0.322477707  0.64495541
## 10  Acidobacteriota_8 0.046814865 0.301600130  0.64495541
print(xtable(phy_lm_table, type = "latex", digits = 3), file="Phylum_LM_results.tex")

5.2 Number of Genera

phy_genus<-tax_glom(ps_filtered, "Genus")
phy_genus
## phyloseq-class experiment-level object
## otu_table()   OTU Table:         [ 136 taxa and 53 samples ]
## sample_data() Sample Data:       [ 53 samples by 8 sample variables ]
## tax_table()   Taxonomy Table:    [ 136 taxa by 7 taxonomic ranks ]
## refseq()      DNAStringSet:      [ 136 reference sequences ]

5.3 Plot Top 20 Most Abundant OTU/ASVs and the rest as residuals

#Top 20 otus 
OTU1<- as(otu_table(ps_filtered), "matrix")
if(taxa_are_rows(ps_filtered)){OTU1 <- t(OTU1)}
OTU1.t <-t(OTU1)
otu_table_ord<-OTU1.t[order(rowSums(OTU1.t),decreasing=T),]
n = 20 # only show top 20 OTUs
otu_table_ord_RA <- t(t(otu_table_ord)/colSums(otu_table_ord))
stack.dfT <- cbind(data.frame(Sample.ID=rownames(metadata_filtered)), t(otu_table_ord_RA[1:n, ]) %>%
                     data.frame(check.names = F) %>% 
                     mutate(Residuals = 1 - rowSums(.))) %>%
  gather(key=ASV, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(ASV, levels = rev(unique(ASV))))
## Warning: attributes are not identical across measure variables;
## they will be dropped
metadata_filtered$Sample <-rownames(metadata_filtered)


Sample_group<-metadata_filtered%>%
  select(Sample, Sample_type) %>% 
  deframe()

MiSeq_Run <- metadata_filtered %>%
  select(Sample, Run_No)

stack.dfT$Sample_group<-Sample_group[match(stack.dfT$Sample.ID, names(Sample_group))]

##overall mean abundances 
mean_ab_groups<-stack.dfT%>%
  group_by(ASV)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)%>%
  arrange(desc(mean_percentage))
write.table(mean_ab_groups,file="Relative_abundance_summary_Top20_OTU.txt ")
print(xtable(mean_ab_groups, type = "latex", digits = 4), file = "Relative_abundance_summary_Top20_OTU.tex")

##mean abundances stratified by Sample_type

mean_ab_groups_str<-stack.dfT%>%
  group_by(ASV, Sample_group, Sample.ID)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100, Group=ifelse(Sample_group=="blank","STGG","rna_protect"))

cols<-c("gray75", "#d28dcb",
"#5eb847",
"#7166d9",
"#a8b635",
"#b756c0",
"#5bbe7f",
"#d74b91",
"#56802f",
"#696fba",
"#d59c34",
"#5f9ed7",
"#cb5329",
"#4cc2bc",
"#d34359",
"#39855f",
"#9d4c79",
"#acb064",
"#c06762",
"#826b2b",
"#cf8a57") 

##plot 
ggplot(mean_ab_groups_str, aes(x =Sample.ID, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack",) + 
  ylab("Relative abundance(%)")+
  xlab("Sample")+
  scale_fill_manual(values = cols)+ 
  #facet_grid(.~Group)+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom", legend.text = element_text(face = "italic")) +
  guides(fill = guide_legend(ncol = 3)) + 
  ggsave("Relative_abundances_top20OTUs.tiff", units="in", width=8, height=6, dpi=300, compression = 'lzw')

To examine the microbial composition of each sample at a higher taxonomic resolution, the top 20 most abundant ASVs were calculated, and their relative abundance in each sample plotted using a stacked bar chart. Tepidimonas_1 was the most abundant ASV across all samples with a mean relative abundance of 22.6%. Curvibacter_2 and Thermus_3 were the second most abundant ASVs at 10.1% and 8.7%.

Of these top 20 most abundant ASVs, the vast majority belong to water and soil associated genera that have been previously described as known contaminants found in sequenced blank controls (Salter et al., 2014). The presence of an ASV belonging to the Staphylococcus genus was also noted as bacteria belonging to this genus are often found as part of the skin microbiota but some may colonise the upper respiratory tract.

ggplot(data = mean_ab_groups, aes(x=ASV, y=mean_percentage, fill=ASV))+
  geom_bar(stat="identity")+
  ylab("Relative abundance (%)")+
  xlab(NULL)+
  scale_fill_manual(values = cols)+ 
  #facet_grid(.~Group)+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom", legend.text = element_text(face = "italic")) +
  scale_x_discrete(label=NULL)+
  guides(fill = guide_legend(ncol = 3))+
  ggsave("Relative_abundances_top20OTUs_Bar_Chart.pdf", units="in", width=8, height=6, dpi=300)

print(mean_ab_groups)
## # A tibble: 21 x 3
##    ASV                                 mean mean_percentage
##    <fct>                              <dbl>           <dbl>
##  1 Residuals                         0.280            28.0 
##  2 Tepidimonas_1                     0.226            22.6 
##  3 Curvibacter_2                     0.101            10.1 
##  4 Thermus_3                         0.0869            8.69
##  5 Thermus_5                         0.0440            4.40
##  6 Sphingomonas_8                    0.0411            4.11
##  7 Schlegelella_4                    0.0285            2.85
##  8 Paucibacter_19                    0.0256            2.56
##  9 Methylobacterium_Methylorubrum_13 0.0229            2.29
## 10 Nitriliruptoraceae_18             0.0167            1.67
## # … with 11 more rows

5.4 Plot Top20 OTU/ASVs by Sample Type

group.labs <- c("blank"="Blank", "rna_protect"="RNA protect", "stgg"="STGG")

ggplot(mean_ab_groups_str, aes(x =Sample.ID, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack",) + 
  ylab("Relative abundance(%)")+
  xlab("Sample")+
  scale_fill_manual(values = cols)+ 
  scale_x_discrete(label=NULL)+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom", legend.text = element_text(face = "italic")) +
  guides(fill = guide_legend(ncol = 3)) + 
  facet_wrap(~Sample_group, labeller = labeller(Sample_group=group.labs), scales="free", nrow = 1,) +
    ggsave("Relative_abundances_top20OTUs_Sample_type.pdf", units="in", width=10, height=5, dpi=300)

Upon dividing samples into groups according to sample types a number of trends become more obvious. Firstly a strong distinction between two groups of environmental control blanks emerged. The samples within each cluster from the enironmental control sample type shared a relatively stable and uniform microbial profile, however the composition of each control blank cluster appeared markedly different.

Grouped by miseq run

RA.df <- stack.dfT%>%
  mutate(log10_RA=log10(RA+1))%>%
  mutate(sqrt_RA=sqrt(RA))

MiSeq_Run<-metadata_filtered%>%
  select(Sample, Run_No) %>% 
  deframe()

RA.df$MiSeq_Run<-MiSeq_Run[match(RA.df$Sample.ID, names(MiSeq_Run))]

5.5 Boxplot of top 20 RA

pd = position_dodge(width = 0.5) 

ggplot(data = RA.df, aes(x=ASV, y=log10_RA, fill=Sample_group))+
  stat_boxplot(geom = "errorbar", position = pd, width = 0.25)+
  geom_boxplot(width = 0.5, position = pd)+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  #geom_dotplot(binaxis = 'y', stackdir='center', dotsize = 1)+
  #geom_jitter(shape=16, position=position_jitter(0.2))+
  #ggtitle("Relative Abundance of the Top 20 Most Abundant ASVs
          #in STGG, RNA protect and Environmental Controls")+
  ylab("log10(Relative abundance)")+
  facet_wrap(~ASV, scales="free")+
  theme_bw()+
  scale_x_discrete(label=NULL)+
  ggsave("Relative_abundances_top20ASVs_Boxplot.pdf", units="in", width=14, height=8, dpi=300)

  #theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom")

5.5.1 Top 20 RA table

Grouped_RA.df <- RA.df %>%
  mutate(mean_percentage=RA*100)%>%
  group_by(ASV, Sample_group) %>%
  summarise_each(funs(mean)) %>%
  select(ASV, Sample_group, mean_percentage, log10_RA)%>%
  arrange(desc(ASV))
## Warning: `summarise_each_()` was deprecated in dplyr 0.7.0.
## Please use `across()` instead.
## Warning: `funs()` was deprecated in dplyr 0.8.0.
## Please use a list of either functions or lambdas: 
## 
##   # Simple named list: 
##   list(mean = mean, median = median)
## 
##   # Auto named with `tibble::lst()`: 
##   tibble::lst(mean, median)
## 
##   # Using lambdas
##   list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA
print(Grouped_RA.df)
## # A tibble: 63 x 4
## # Groups:   ASV [21]
##    ASV            Sample_group mean_percentage log10_RA
##    <fct>          <chr>                  <dbl>    <dbl>
##  1 Tepidimonas_1  blank                  10.3   0.0386 
##  2 Tepidimonas_1  rna_protect             0     0      
##  3 Tepidimonas_1  stgg                   46.7   0.165  
##  4 Curvibacter_2  blank                  13.5   0.0517 
##  5 Curvibacter_2  rna_protect            26.5   0.102  
##  6 Curvibacter_2  stgg                    0     0      
##  7 Thermus_3      blank                  11.5   0.0454 
##  8 Thermus_3      rna_protect            17.3   0.0689 
##  9 Thermus_3      stgg                    2.00  0.00857
## 10 Schlegelella_4 blank                   4.33  0.0180 
## # … with 53 more rows
print(xtable(Grouped_RA.df, type = "latex", digits = 3), include.rownames = FALSE, sanitize.text.function=italic, file = "top20_grouped_RA.tex")

5.6 Linear Model of top 20 Most Abundant RAs

5.6.1 Tepidemonas

library(lmerTest)

TepRA <- filter(RA.df, ASV=="Tepidimonas_1")
Tep <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=TepRA)
summary(Tep)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = TepRA)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.07026 -0.02470  0.00000  0.01246  0.13951 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              4.486e+00  8.574e-01   5.232 3.47e-06 ***
## Sample_grouprna_protect  1.126e-16  1.779e-02   0.000        1    
## Sample_groupstgg         8.746e-02  1.352e-02   6.471 4.38e-08 ***
## MiSeq_Run               -8.577e-03  1.653e-03  -5.187 4.05e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.03794 on 49 degrees of freedom
## Multiple R-squared:  0.7937, Adjusted R-squared:  0.7811 
## F-statistic: 62.84 on 3 and 49 DF,  p-value: < 2.2e-16
par(mfrow=c(2,2)) # Change the panel layout to 2 x 2
plot(Tep)

p1 <- 2.2e-16
Tep2 <- glm(log10_RA ~ Sample_group + MiSeq_Run, family = poisson, data = TepRA)
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.080787
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.053875
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.043073
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.052498
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.006935
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.093539
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.028876
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.034398
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.031614
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.089656
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.163423
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.108176
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.216709
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.136475
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.197135
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.158052
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.108242
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.206160
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.178079
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.188005
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.168799
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.139544
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.121951
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.140430
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.117869
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.127468
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.113671
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.135297
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.212650
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.221944
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.204267
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.216070
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.201104
par(mfrow=c(2,2))
plot(Tep2)

### Curvibacter

CurvRA <- filter(RA.df, ASV=="Curvibacter_2")
Curv <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=CurvRA)
summary(Curv)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = CurvRA)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.03168  0.00000  0.00000  0.00000  0.01973 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -5.902e+00  1.941e-01 -30.414   <2e-16 ***
## Sample_grouprna_protect -1.633e-03  4.026e-03  -0.406    0.687    
## Sample_groupstgg        -1.073e-15  3.060e-03   0.000    1.000    
## MiSeq_Run                1.148e-02  3.743e-04  30.682   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.008588 on 49 degrees of freedom
## Multiple R-squared:  0.9733, Adjusted R-squared:  0.9716 
## F-statistic: 594.6 on 3 and 49 DF,  p-value: < 2.2e-16
par(mfrow=c(2,2))
plot(Curv)

p2 <- 2.2e-16

5.6.2 Thermus_3

Therm3RA <- filter(RA.df, ASV=="Thermus_3")
hist(Therm3RA$log10_RA)

Therm3 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Therm3RA)
summary(Therm3)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Therm3RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.029936 -0.006793 -0.001699  0.006432  0.041384 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -4.4005363  0.2994868 -14.694   <2e-16 ***
## Sample_grouprna_protect -0.0151103  0.0062131  -2.432   0.0187 *  
## Sample_groupstgg         0.0017792  0.0047215   0.377   0.7079    
## MiSeq_Run                0.0085746  0.0005776  14.846   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01325 on 49 degrees of freedom
## Multiple R-squared:  0.8806, Adjusted R-squared:  0.8733 
## F-statistic: 120.5 on 3 and 49 DF,  p-value: < 2.2e-16
par(mfrow=c(2,2))
plot(Therm3)

### Schlegelella_4

SchlegRA <- filter(RA.df, ASV=="Schlegelella_4")
Schleg <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=SchlegRA)
summary(Schleg)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = SchlegRA)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.02312  0.00000  0.00000  0.00000  0.01351 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -2.057e+00  1.298e-01 -15.848  < 2e-16 ***
## Sample_grouprna_protect -1.290e-02  2.693e-03  -4.791 1.58e-05 ***
## Sample_groupstgg        -3.715e-16  2.047e-03   0.000        1    
## MiSeq_Run                4.003e-03  2.504e-04  15.987  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.005745 on 49 degrees of freedom
## Multiple R-squared:  0.8903, Adjusted R-squared:  0.8836 
## F-statistic: 132.5 on 3 and 49 DF,  p-value: < 2.2e-16
par(mfrow=c(2,2))
plot(Schleg)

### Thermus_5

Therm5RA <- filter(RA.df, ASV=="Thermus_5")
Therm5 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Therm5RA)
summary(Therm5)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Therm5RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.018648 -0.003348  0.000000  0.002313  0.044376 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              1.084e+00  2.507e-01   4.323 7.53e-05 ***
## Sample_grouprna_protect  5.630e-17  5.201e-03   0.000        1    
## Sample_groupstgg         1.770e-02  3.952e-03   4.479 4.49e-05 ***
## MiSeq_Run               -2.072e-03  4.835e-04  -4.286 8.50e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01109 on 49 degrees of freedom
## Multiple R-squared:  0.6867, Adjusted R-squared:  0.6675 
## F-statistic: 35.79 on 3 and 49 DF,  p-value: 2.127e-12
par(mfrow=c(2,2))
plot(Therm5)

### Caulobacter_6

Caul6RA <- filter(RA.df, ASV=="Caulobacter_6")
Caul6 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Caul6RA)
summary(Caul6)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Caul6RA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0185179 -0.0007313  0.0000000  0.0000000  0.0220961 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -1.0150806  0.1321547  -7.681 5.89e-10 ***
## Sample_grouprna_protect -0.0021489  0.0027416  -0.784    0.437    
## Sample_groupstgg        -0.0007313  0.0020835  -0.351    0.727    
## MiSeq_Run                0.0019763  0.0002549   7.754 4.55e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.005848 on 49 degrees of freedom
## Multiple R-squared:  0.6956, Adjusted R-squared:  0.6769 
## F-statistic: 37.32 on 3 and 49 DF,  p-value: 1.056e-12
par(mfrow=c(2,2))
plot(Caul6)

### Comamonadaceae_7

Coma7RA <- filter(RA.df, ASV=="Comamonadaceae_7")
Coma7 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Coma7RA)
summary(Coma7)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Coma7RA)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.01220  0.00000  0.00000  0.00000  0.01155 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -1.056e+00  9.060e-02 -11.661 9.64e-16 ***
## Sample_grouprna_protect -6.302e-03  1.879e-03  -3.353  0.00155 ** 
## Sample_groupstgg        -1.899e-16  1.428e-03   0.000  1.00000    
## MiSeq_Run                2.055e-03  1.747e-04  11.763 7.01e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.004009 on 49 degrees of freedom
## Multiple R-squared:  0.8157, Adjusted R-squared:  0.8044 
## F-statistic:  72.3 on 3 and 49 DF,  p-value: < 2.2e-16
par(mfrow=c(2,2))
plot(Coma7)

### Sphingomonas_8

Sphing8RA <- filter(RA.df, ASV=="Sphingomonas_8")
Sphing8 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Sphing8RA)
summary(Sphing8)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Sphing8RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.046260 -0.009524  0.000000  0.000000  0.166240 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              2.688e+00  7.064e-01   3.806 0.000393 ***
## Sample_grouprna_protect -4.504e-16  1.465e-02   0.000 1.000000    
## Sample_groupstgg        -3.417e-02  1.114e-02  -3.069 0.003500 ** 
## MiSeq_Run               -5.140e-03  1.362e-03  -3.773 0.000435 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.03126 on 49 degrees of freedom
## Multiple R-squared:  0.2658, Adjusted R-squared:  0.2208 
## F-statistic: 5.912 on 3 and 49 DF,  p-value: 0.001587
par(mfrow=c(2,2))
plot(Sphing8)

### Bosea_9

Bos9RA <- filter(RA.df, ASV=="Bosea_9")
Bos9 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Bos9RA)
summary(Bos9)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Bos9RA)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.01220  0.00000  0.00000  0.00000  0.01006 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -8.779e-01  7.201e-02 -12.192   <2e-16 ***
## Sample_grouprna_protect -3.170e-03  1.494e-03  -2.122   0.0389 *  
## Sample_groupstgg        -1.579e-16  1.135e-03   0.000   1.0000    
## MiSeq_Run                1.708e-03  1.389e-04  12.299   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.003186 on 49 degrees of freedom
## Multiple R-squared:  0.8383, Adjusted R-squared:  0.8284 
## F-statistic: 84.66 on 3 and 49 DF,  p-value: < 2.2e-16
par(mfrow=c(2,2))
plot(Bos9)

### Thermus_thermophilus_10

Therm10RA <- filter(RA.df, ASV=="Thermus_thermophilus_10")
Therm10 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Therm10RA)
summary(Therm10)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Therm10RA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0078176 -0.0016196  0.0000000  0.0006173  0.0107406 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              9.411e-02  8.154e-02   1.154    0.254    
## Sample_grouprna_protect -1.971e-17  1.692e-03   0.000    1.000    
## Sample_groupstgg         1.324e-02  1.286e-03  10.302 7.43e-14 ***
## MiSeq_Run               -1.800e-04  1.573e-04  -1.144    0.258    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.003608 on 49 degrees of freedom
## Multiple R-squared:  0.7993, Adjusted R-squared:  0.787 
## F-statistic: 65.04 on 3 and 49 DF,  p-value: < 2.2e-16
par(mfrow=c(2,2))
plot(Therm10)

### Sphingobium_11

Sphing11RA <- filter(RA.df, ASV=="Sphingobium_11")
Sphing11 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Sphing11RA)
summary(Sphing11)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Sphing11RA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0115491 -0.0002148 -0.0002148  0.0000000  0.0157031 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -0.6595829  0.0883679  -7.464 1.27e-09 ***
## Sample_grouprna_protect -0.0021151  0.0018333  -1.154    0.254    
## Sample_groupstgg         0.0002148  0.0013932   0.154    0.878    
## MiSeq_Run                0.0012832  0.0001704   7.530 1.01e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.00391 on 49 degrees of freedom
## Multiple R-squared:  0.6579, Adjusted R-squared:  0.6369 
## F-statistic: 31.41 on 3 and 49 DF,  p-value: 1.799e-11
par(mfrow=c(2,2))
plot(Sphing11)

### Pseudomonas_12

Pseudo12RA <- filter(RA.df, ASV=="Pseudomonas_12")
Pseudo12 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Pseudo12RA)
summary(Pseudo12)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Pseudo12RA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0064744 -0.0036654 -0.0000223  0.0023062  0.0144748 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)
## (Intercept)             -0.1497721  0.1059689  -1.413    0.164
## Sample_grouprna_protect  0.0001223  0.0021984   0.056    0.956
## Sample_groupstgg         0.0023537  0.0016706   1.409    0.165
## MiSeq_Run                0.0002985  0.0002044   1.461    0.150
## 
## Residual standard error: 0.004689 on 49 degrees of freedom
## Multiple R-squared:  0.05678,    Adjusted R-squared:  -0.0009732 
## F-statistic: 0.9831 on 3 and 49 DF,  p-value: 0.4084
par(mfrow=c(2,2))
plot(Pseudo12)

### Methylobacterium_Methylorubrum_13

Meth13RA <- filter(RA.df, ASV=="Methylobacterium_Methylorubrum_13")
Meth13 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Meth13RA)
summary(Meth13)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Meth13RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.015940 -0.008144 -0.000422  0.000000  0.066607 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)  
## (Intercept)              0.7862192  0.3388988   2.320   0.0246 *
## Sample_grouprna_protect -0.0004219  0.0070307  -0.060   0.9524  
## Sample_groupstgg         0.0019961  0.0053429   0.374   0.7103  
## MiSeq_Run               -0.0015025  0.0006536  -2.299   0.0258 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.015 on 49 degrees of freedom
## Multiple R-squared:  0.202,  Adjusted R-squared:  0.1531 
## F-statistic: 4.134 on 3 and 49 DF,  p-value: 0.01086
par(mfrow=c(2,2))
plot(Meth13)

### Ottowia_14

Otto14RA <- filter(RA.df, ASV=="Ottowia_14")
Otto14 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Otto14RA)
summary(Otto14)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Otto14RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.009388  0.000000  0.000000  0.000000  0.012397 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -4.671e-01  9.035e-02  -5.169 4.32e-06 ***
## Sample_grouprna_protect  1.210e-03  1.874e-03   0.646    0.522    
## Sample_groupstgg        -8.410e-17  1.424e-03   0.000    1.000    
## MiSeq_Run                9.087e-04  1.743e-04   5.215 3.69e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.003998 on 49 degrees of freedom
## Multiple R-squared:  0.5423, Adjusted R-squared:  0.5142 
## F-statistic: 19.35 on 3 and 49 DF,  p-value: 2.055e-08
par(mfrow=c(2,2))
plot(Otto14)

### Azospirillum_15

Azo14RA <- filter(RA.df, ASV=="Azospirillum_15")
Azo14 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Azo14RA)
summary(Azo14)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Azo14RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.009572  0.000000  0.000000  0.000000  0.012203 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -5.467e-01  7.274e-02  -7.515 1.06e-09 ***
## Sample_grouprna_protect -2.832e-03  1.509e-03  -1.876   0.0666 .  
## Sample_groupstgg        -9.803e-17  1.147e-03   0.000   1.0000    
## MiSeq_Run                1.064e-03  1.403e-04   7.581 8.40e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.003219 on 49 degrees of freedom
## Multiple R-squared:  0.6525, Adjusted R-squared:  0.6312 
## F-statistic: 30.67 on 3 and 49 DF,  p-value: 2.626e-11
par(mfrow=c(2,2))
plot(Azo14)

### Meiothermus_silvanus_16

Meio16RA <- filter(RA.df, ASV=="Meiothermus_silvanus_16")
Meio16 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Meio16RA)
summary(Meio16)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Meio16RA)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.00902  0.00000  0.00000  0.00000  0.02444 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -6.850e-01  9.931e-02  -6.897 9.56e-09 ***
## Sample_grouprna_protect -7.157e-03  2.060e-03  -3.474  0.00108 ** 
## Sample_groupstgg        -1.280e-16  1.566e-03   0.000  1.00000    
## MiSeq_Run                1.333e-03  1.915e-04   6.958 7.70e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.004395 on 49 degrees of freedom
## Multiple R-squared:  0.5887, Adjusted R-squared:  0.5635 
## F-statistic: 23.37 on 3 and 49 DF,  p-value: 1.557e-09
par(mfrow=c(2,2))
plot(Meio16)

5.6.3 Staphylococcus_17

Staph17RA <- filter(RA.df, ASV=="Staphylococcus_17")
Staph17 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Staph17RA)
summary(Staph17)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Staph17RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.010819 -0.004793 -0.003570  0.003275  0.034368 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)
## (Intercept)              0.3549610  0.2403160   1.477    0.146
## Sample_grouprna_protect  0.0044842  0.0049855   0.899    0.373
## Sample_groupstgg        -0.0062834  0.0037887  -1.658    0.104
## MiSeq_Run               -0.0006695  0.0004635  -1.445    0.155
## 
## Residual standard error: 0.01063 on 49 degrees of freedom
## Multiple R-squared:  0.06854,    Adjusted R-squared:  0.01152 
## F-statistic: 1.202 on 3 and 49 DF,  p-value: 0.3189
par(mfrow=c(2,2))
plot(Staph17)

### Nitriliruptoraceae_18

Nitril18RA <- filter(RA.df, ASV=="Nitriliruptoraceae_18")
Nitril18 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Nitril18RA)
summary(Nitril18)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Nitril18RA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0133870 -0.0026933 -0.0002246  0.0024915  0.0182459 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              0.6468485  0.1306326   4.952 9.13e-06 ***
## Sample_grouprna_protect -0.0001250  0.0027101  -0.046   0.9634    
## Sample_groupstgg        -0.0054882  0.0020595  -2.665   0.0104 *  
## MiSeq_Run               -0.0012324  0.0002519  -4.892 1.12e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.005781 on 49 degrees of freedom
## Multiple R-squared:  0.3784, Adjusted R-squared:  0.3403 
## F-statistic: 9.943 on 3 and 49 DF,  p-value: 3.14e-05
par(mfrow=c(2,2))
plot(Nitril18)

### Paucibacter_19

Pauci19RA <- filter(RA.df, ASV=="Paucibacter_19")
Pauci19 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Pauci19RA)
summary(Pauci19)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Pauci19RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.021977 -0.002729 -0.000348  0.003230  0.081139 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)   
## (Intercept)              1.122799   0.325094   3.454  0.00115 **
## Sample_grouprna_protect  0.017391   0.006744   2.579  0.01298 * 
## Sample_groupstgg        -0.016772   0.005125  -3.272  0.00196 **
## MiSeq_Run               -0.002142   0.000627  -3.416  0.00129 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01439 on 49 degrees of freedom
## Multiple R-squared:  0.2676, Adjusted R-squared:  0.2228 
## F-statistic: 5.969 on 3 and 49 DF,  p-value: 0.001495
par(mfrow=c(2,2))
plot(Pauci19)

### Brevundimonas_20

Brev20RA <- filter(RA.df, ASV=="Brevundimonas_20")
Brev20 <- lm(log10_RA ~ Sample_group + MiSeq_Run, data=Brev20RA)
summary(Brev20)
## 
## Call:
## lm(formula = log10_RA ~ Sample_group + MiSeq_Run, data = Brev20RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.007648  0.000000  0.000000  0.000000  0.012488 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -5.461e-01  7.614e-02  -7.172 3.60e-09 ***
## Sample_grouprna_protect -3.999e-03  1.580e-03  -2.532   0.0146 *  
## Sample_groupstgg        -9.803e-17  1.200e-03   0.000   1.0000    
## MiSeq_Run                1.062e-03  1.468e-04   7.235 2.87e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.00337 on 49 degrees of freedom
## Multiple R-squared:  0.6186, Adjusted R-squared:  0.5953 
## F-statistic: 26.49 on 3 and 49 DF,  p-value: 2.499e-10
par(mfrow=c(2,2))
plot(Brev20)

## Combined p-value

P_Value <- c("2.2e-16", "2.2e-16", "2.2e-16", "2.2e-16", "2.127e-12", "1.056e-12", "2.2e-16", "0.001587", "2.2e-16", "2.2e-16", "1.799e-11", "0.4084", "0.01086", "2.055e-08", "2.626e-11", "1.557e-09", "0.3189", "3.14e-05", "0.001495", "2.499e-10")
Adjusted_P_Value <- p.adjust(P_Value, method = "BH")

5.7 Table of p-values

top20_names <- rev(as.vector(mean_ab_groups$ASV)) 
top20_names <- top20_names[! top20_names %in% "Residuals"]

top20_pval <- c(lmp(Tep), lmp(Curv), lmp(Therm3), lmp(Schleg), lmp(Therm5), lmp(Caul6), lmp(Coma7), lmp(Sphing8), lmp(Bos9), lmp(Therm10), lmp(Sphing11), lmp(Pseudo12), lmp(Meth13), lmp(Otto14), lmp(Azo14), lmp(Meio16), lmp(Staph17), lmp(Nitril18), lmp(Pauci19), lmp(Brev20))

top20_adjpval <- p.adjust(top20_pval, method = "BH")

top20_R2 <- c(summary(Tep)$r.squared, summary(Curv)$r.squared, summary(Therm3)$r.squared, summary(Schleg)$r.squared, summary(Therm5)$r.squared, summary(Caul6)$r.squared, summary(Coma7)$r.squared, summary(Sphing8)$r.squared, summary(Bos9)$r.squared, summary(Therm10)$r.squared, summary(Sphing11)$r.squared, summary(Pseudo12)$r.squared, summary(Meth13)$r.squared, summary(Otto14)$r.squared, summary(Azo14)$r.squared, summary(Meio16)$r.squared, summary(Staph17)$r.squared, summary(Nitril18)$r.squared, summary(Pauci19)$r.squared, summary(Brev20)$r.squared)

top20_pval.df <- data.frame(top20_names, top20_R2, top20_pval, top20_adjpval)

#top20_pval.df <- data.frame(top20_names, P_Value, Adjusted_P_Value)

top20_pval.df <- top20_pval.df %>%
  rename(ASV = top20_names)

print(top20_pval.df)
##                                  ASV   top20_R2   top20_pval top20_adjpval
## 1                   Brevundimonas_20 0.79371378 8.131030e-17  2.323151e-16
## 2                    Azospirillum_15 0.97326473 1.627495e-38  3.254990e-37
## 3                         Ottowia_14 0.88063171 1.290990e-22  8.606602e-22
## 4            Meiothermus_silvanus_16 0.89027117 1.649154e-23  1.649154e-22
## 5                     Sphingobium_11 0.68667011 2.127411e-12  4.727579e-12
## 6                            Bosea_9 0.69558205 1.055536e-12  2.638840e-12
## 7                     Pseudomonas_12 0.81571522 5.197198e-18  2.078879e-17
## 8            Thermus_thermophilus_10 0.26576411 1.587473e-03  1.867616e-03
## 9                   Comamonadaceae_7 0.83827929 2.146263e-19  1.073132e-18
## 10                 Staphylococcus_17 0.79927301 4.177428e-17  1.392476e-16
## 11                     Caulobacter_6 0.65786356 1.798508e-11  3.597016e-11
## 12             Nitriliruptoraceae_18 0.05677527 4.084309e-01  4.084309e-01
## 13 Methylobacterium_Methylorubrum_13 0.20198160 1.086480e-02  1.207200e-02
## 14                    Paucibacter_19 0.54226699 2.054586e-08  2.935122e-08
## 15                    Schlegelella_4 0.65248336 2.625739e-11  4.774071e-11
## 16                    Sphingomonas_8 0.58866225 1.556789e-09  2.395060e-09
## 17                         Thermus_5 0.06854388 3.189125e-01  3.356973e-01
## 18                         Thermus_3 0.37840492 3.139720e-05  4.186293e-05
## 19                     Curvibacter_2 0.26764887 1.495191e-03  1.867616e-03
## 20                     Tepidimonas_1 0.61861982 2.498861e-10  4.164768e-10
write.table(top20_pval.df,file="Top_20_Pval.txt")

italic <- function(x){
  paste("\textit{",
        x,
        "}")
}

print(xtable(top20_pval.df, digits = c( 0, 0, 3, -3, -3), type = "latex"), sanitize.text.function=italic, include.rownames=FALSE, file = "Top20_pval.tex")
mean_ab_groups_str<-stack.dfT%>%
  group_by(ASV, Sample_group)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100, Group=ifelse(Sample_group=="blank","STGG","rna_protect"))

##Plot Stack Bargraph
ggplot(mean_ab_groups_str, aes(x = Sample_group, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack") + 
  ylab("Relative abundance(%)")+
  xlab("Sample")+
  scale_fill_manual(values = cols)+
  #facet_grid(.~Sample_group, scales = "free")+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5))  +
ggsave("Relative_abundances_top20OTUs_Sample_type2.tiff", units="in", width=8, height=5, dpi=300, compression = 'lzw')

# Calculate the Top 20 most abundant taxa in each sample type ##STGG

ps.top20.STGG <- prune_samples(sample_data(ps_filtered)$Sample_type=="stgg", ps_filtered)
metadata_STGG <- data.frame(sample_data(ps.top20.STGG))
OTU2<- as(otu_table(ps.top20.STGG), "matrix")
if(taxa_are_rows(ps.top20.STGG)){OTU2 <- t(OTU2)}
OTU2.t <-t(OTU2)
otu_table_ord2<-OTU2.t[order(rowSums(OTU2.t),decreasing=T),]
n = 20 # only show top 20 OTUs
otu_table_ord_RA2 <- t(t(otu_table_ord2)/colSums(otu_table_ord2))
stack.dfT_STGG <- cbind(data.frame(Sample.ID=rownames(metadata_STGG)), t(otu_table_ord_RA2[1:n, ]) %>%
                     data.frame(check.names = F) %>% 
                     mutate(Residuals = 1 - rowSums(.))) %>%
  gather(key=ASV, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(ASV, levels = rev(unique(ASV))))
## Warning: attributes are not identical across measure variables;
## they will be dropped
metadata_STGG$Sample <-rownames(metadata_STGG)

Sample_group2<-metadata_STGG%>%
  select(Sample, Sample_type) %>% 
  deframe()

stack.dfT_STGG$Sample_group<- Sample_group2

mean_ab_groups_STGG<-stack.dfT_STGG%>%
  group_by(ASV)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)

mean_ab_groups_str_STGG<-stack.dfT_STGG%>%
  group_by(ASV, Sample_group)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)

##Plot Stack Bargraph
ggplot(mean_ab_groups_str_STGG, aes(x = Sample_group, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack") + 
  ylab("Relative abundance(%)")+
  xlab("STGG")+
  scale_fill_manual(values = cols)+
  #facet_grid(.~Sample_group, scales = "free")+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5))+
  scale_x_discrete(label=NULL)+
  ggsave("Relative_abundances_top20OTUs_STGG.tiff", units="in", width=8, height=5, dpi=300, compression = 'lzw')

5.8 Blank 514

ps.top20.b514 <- prune_samples(sample_data(ps_filtered)$Sample_type=="blank", ps_filtered)
ps.top20.b514 <- prune_samples(sample_data(ps.top20.b514)$Run_No=="514", ps.top20.b514)
metadata_b514 <- data.frame(sample_data(ps.top20.b514))
OTU2<- as(otu_table(ps.top20.b514), "matrix")
if(taxa_are_rows(ps.top20.b514)){OTU2 <- t(OTU2)}
OTU2.t <-t(OTU2)
otu_table_ord2<-OTU2.t[order(rowSums(OTU2.t),decreasing=T),]
n = 20 # only show top 20 OTUs
otu_table_ord_RA2 <- t(t(otu_table_ord2)/colSums(otu_table_ord2))
stack.dfT_b514 <- cbind(data.frame(Sample.ID=rownames(metadata_b514)), t(otu_table_ord_RA2[1:n, ]) %>%
                     data.frame(check.names = F) %>% 
                     mutate(Residuals = 1 - rowSums(.))) %>%
  gather(key=ASV, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(ASV, levels = rev(unique(ASV))))
## Warning: attributes are not identical across measure variables;
## they will be dropped
metadata_b514$Sample <-rownames(metadata_b514)

Sample_group2<-metadata_b514%>%
  select(Sample, Sample_type) %>% 
  deframe()

stack.dfT_b514$Sample_group<- Sample_group2

mean_ab_groups_b514<-stack.dfT_b514%>%
  group_by(ASV)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)

mean_ab_groups_str_b514<-stack.dfT_b514%>%
  group_by(ASV, Sample_group)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)

##Plot Stack Bargraph
ggplot(mean_ab_groups_str_b514, aes(x = Sample_group, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack") + 
  ylab("Relative abundance(%)")+
  xlab("STGG")+
  scale_fill_manual(values = cols)+
  #facet_grid(.~Sample_group, scales = "free")+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5))+
  scale_x_discrete(label=NULL)#+

  #ggsave("Relative_abundances_top20OTUs_b514.tiff", units="in", width=8, height=5, dpi=300, compression = 'lzw')

5.9 Run514

ps.top20.514 <- prune_samples(sample_data(ps_filtered)$Run_No=="514", ps_filtered)

OTU3<- as(otu_table(ps.top20.514), "matrix")
if(taxa_are_rows(ps.top20.514)){OTU3 <- t(OTU3)}
OTU3.t <-t(OTU3)
otu_table_ord3<-OTU3.t[order(rowSums(OTU3.t),decreasing=T),]
n = 20 # only show top 20 OTUs
otu_table_ord_RA3 <- t(t(otu_table_ord3)/colSums(otu_table_ord3))
stack.dfT_514 <- cbind(data.frame(Sample.ID=rownames(metadata514)), t(otu_table_ord_RA3[1:n, ]) %>%
                     data.frame(check.names = F) %>% 
                     mutate(Residuals = 1 - rowSums(.))) %>%
  gather(key=ASV, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(ASV, levels = rev(unique(ASV))))
## Warning: attributes are not identical across measure variables;
## they will be dropped
metadata514$Sample <-rownames(metadata514)

Sample_group3<-metadata514%>%
  select(Sample, Sample_type) %>% 
  deframe()

stack.dfT_514$Sample_group<- Sample_group3

mean_ab_groups_str_514<-stack.dfT_514%>%
  group_by(ASV, Sample_group)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)%>%
  arrange(mean_percentage)

##Plot Stack Bargraph
ggplot(mean_ab_groups_str_514, aes(x = Sample_group, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack") + 
  ylab("Relative abundance(%)")+
  xlab("Sample Type")+
  scale_fill_manual(values = cols)+
  #facet_grid(.~Sample_group, scales = "free")+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5))+
  ggsave("Relative_abundances_top20ASVs_Run_514.tiff", units="in", width=8, height=5, dpi=300, compression = 'lzw')

### Were any taxa exclusively found in STGG?

# Exclusive to STGG
STGG_truetaxa.df <- full_join(mean_ab_groups_str_STGG, mean_ab_groups_str_b514, "ASV", suffix = c("_STGG", "_Blank")) %>%
  mutate(Exclusive = is.na(Sample_group_Blank)) %>%
  select(ASV, mean_percentage_STGG, mean_percentage_Blank, Exclusive) %>%
  arrange(desc(mean_percentage_STGG))

print(STGG_truetaxa.df)
## # A tibble: 28 x 4
## # Groups:   ASV [28]
##    ASV                         mean_percentage_ST… mean_percentage_Bl… Exclusive
##    <fct>                                     <dbl>               <dbl> <lgl>    
##  1 Tepidimonas_1                             46.7                20.5  FALSE    
##  2 Residuals                                 15.7                24.1  FALSE    
##  3 Thermus_5                                  8.76                4.48 FALSE    
##  4 Methylobacterium_Methyloru…                3.80                3.41 FALSE    
##  5 Thermus_thermophilus_10                    3.49               NA    TRUE     
##  6 Sphingomonas_8                             2.89               12.3  FALSE    
##  7 Thermus_3                                  2.00                1.63 FALSE    
##  8 Methylobacterium_Methyloru…                1.84                1.34 FALSE    
##  9 Nitriliruptoraceae_18                      1.84                3.15 FALSE    
## 10 Methylobacterium_Methyloru…                1.73               NA    TRUE     
## # … with 18 more rows
print(which(STGG_truetaxa.df$Exclusive))
## [1]  5 10 11 14 18 19 21

5.10 RNA

ps.top20.RNA <- prune_samples(sample_data(ps_filtered)$Sample_type=="rna_protect", ps_filtered)
metadata_RNA <- data.frame(sample_data(ps.top20.RNA))
OTU4<- as(otu_table(ps.top20.RNA), "matrix")
if(taxa_are_rows(ps.top20.RNA)){OTU4 <- t(OTU4)}
OTU4.t <-t(OTU4)
otu_table_ord4<-OTU4.t[order(rowSums(OTU4.t),decreasing=T),]
n = 20 # only show top 20 OTUs
otu_table_ord_RA4 <- t(t(otu_table_ord4)/colSums(otu_table_ord4))
stack.dfT_RNA <- cbind(data.frame(Sample.ID=rownames(metadata_RNA)), t(otu_table_ord_RA4[1:n, ]) %>%
                     data.frame(check.names = F) %>% 
                     mutate(Residuals = 1 - rowSums(.))) %>%
  gather(key=ASV, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(ASV, levels = rev(unique(ASV))))
## Warning: attributes are not identical across measure variables;
## they will be dropped
metadata_RNA$Sample <-rownames(metadata_RNA)

Sample_group4<-metadata_RNA%>%
  select(Sample, Sample_type) %>% 
  deframe()

stack.dfT_RNA$Sample_group<- Sample_group4

mean_ab_groups_str_RNA<-stack.dfT_RNA%>%
  group_by(ASV, Sample_group)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)

##Plot Stack Bargraph
ggplot(mean_ab_groups_str_RNA, aes(x = Sample_group, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack") + 
  ylab("Relative abundance(%)")+
  xlab("RNA Protect")+
  scale_fill_manual(values = cols)+
  #facet_grid(.~Sample_group, scales = "free")+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5))+
  scale_x_discrete(label=NULL)+
  ggsave("Relative_abundances_top20ASVs_RNA_Protect.tiff", units="in", width=8, height=5, dpi=300, compression = 'lzw')

## Blank 523

ps.top20.b523 <- prune_samples(sample_data(ps_filtered)$Sample_type=="blank", ps_filtered)
ps.top20.b523 <- prune_samples(sample_data(ps.top20.b523)$Run_No=="523", ps.top20.b523)
metadata_b523 <- data.frame(sample_data(ps.top20.b523))
OTU2<- as(otu_table(ps.top20.b523), "matrix")
if(taxa_are_rows(ps.top20.b523)){OTU2 <- t(OTU2)}
OTU2.t <-t(OTU2)
otu_table_ord2<-OTU2.t[order(rowSums(OTU2.t),decreasing=T),]
n = 20 # only show top 20 OTUs
otu_table_ord_RA2 <- t(t(otu_table_ord2)/colSums(otu_table_ord2))
stack.dfT_b523 <- cbind(data.frame(Sample.ID=rownames(metadata_b523)), t(otu_table_ord_RA2[1:n, ]) %>%
                     data.frame(check.names = F) %>% 
                     mutate(Residuals = 1 - rowSums(.))) %>%
  gather(key=ASV, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(ASV, levels = rev(unique(ASV))))
## Warning: attributes are not identical across measure variables;
## they will be dropped
metadata_b523$Sample <-rownames(metadata_b523)

Sample_group2<-metadata_b523%>%
  select(Sample, Sample_type) %>% 
  deframe()

stack.dfT_b523$Sample_group<- Sample_group2

mean_ab_groups_b523<-stack.dfT_b523%>%
  group_by(ASV)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)

mean_ab_groups_str_b523<-stack.dfT_b523%>%
  group_by(ASV, Sample_group)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)

##Plot Stack Bargraph
ggplot(mean_ab_groups_str_b523, aes(x = Sample_group, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack") + 
  ylab("Relative abundance(%)")+
  xlab("STGG")+
  scale_fill_manual(values = cols)+
  #facet_grid(.~Sample_group, scales = "free")+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5))+
  scale_x_discrete(label=NULL)#+

  #ggsave("Relative_abundances_top20OTUs_b523.tiff", units="in", width=8, height=5, dpi=300, compression = 'lzw')

5.11 Run 523

ps.top20.523 <- prune_samples(sample_data(ps_filtered)$Run_No=="523", ps_filtered)
OTU5<- as(otu_table(ps.top20.523), "matrix")
if(taxa_are_rows(ps.top20.523)){OTU5 <- t(OTU5)}
OTU5.t <-t(OTU5)
otu_table_ord5<-OTU5.t[order(rowSums(OTU5.t),decreasing=T),]
n = 20 # only show top 20 OTUs
otu_table_ord_RA5 <- t(t(otu_table_ord5)/colSums(otu_table_ord5))
stack.dfT_523 <- cbind(data.frame(Sample.ID=rownames(metadata523)), t(otu_table_ord_RA5[1:n, ]) %>%
                     data.frame(check.names = F) %>% 
                     mutate(Residuals = 1 - rowSums(.))) %>%
  gather(key=ASV, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(ASV, levels = rev(unique(ASV))))
## Warning: attributes are not identical across measure variables;
## they will be dropped
metadata523$Sample <-rownames(metadata523)

Sample_group5<-metadata523%>%
  select(Sample, Sample_type) %>% 
  deframe()

stack.dfT_523$Sample_group<- Sample_group5

mean_ab_groups_str_523<-stack.dfT_523%>%
  group_by(ASV, Sample_group)%>%
  summarise(mean=mean(RA))%>%
  mutate(mean_percentage=mean*100)

##Plot Stack Bargraph
ggplot(mean_ab_groups_str_523, aes(x = Sample_group, y = mean_percentage, fill = ASV)) +
  geom_bar(stat = "identity", position = "stack") + 
  ylab("Relative abundance(%)")+
  xlab("Sample Type")+
  scale_fill_manual(values = cols)+
  #facet_grid(.~Sample_group, scales = "free")+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5))+
  ggsave("Relative_abundances_top20ASVs_Run_523.tiff", units="in", width=8, height=5, dpi=300, compression = 'lzw')

5.11.1 Were any taxa exclusively found in RNA Protect?

# Exclusive to STGG
RNA_truetaxa.df <- full_join(mean_ab_groups_str_RNA, mean_ab_groups_str_b523, "ASV", suffix = c("_RNA", "_Blank")) %>%
  mutate(Exclusive = is.na(Sample_group_Blank)) %>%
  select(ASV, mean_percentage_RNA, mean_percentage_Blank, Exclusive) %>%
  arrange(desc(mean_percentage_RNA))

print(RNA_truetaxa.df)
## # A tibble: 23 x 4
## # Groups:   ASV [23]
##    ASV              mean_percentage_RNA mean_percentage_Blank Exclusive
##    <fct>                          <dbl>                 <dbl> <lgl>    
##  1 Curvibacter_2                  26.5                 26.9   FALSE    
##  2 Residuals                      19.0                 10.9   FALSE    
##  3 Thermus_3                      17.3                 21.4   FALSE    
##  4 Schlegelella_4                  5.50                 8.67  FALSE    
##  5 Paucibacter_19                  5.07                 0.625 FALSE    
##  6 Caulobacter_6                   3.88                 4.37  FALSE    
##  7 Comamonadaceae_7                2.86                 4.36  FALSE    
##  8 Bosea_9                         2.86                 3.61  FALSE    
##  9 Sphingobium_11                  2.21                 2.70  FALSE    
## 10 Ottowia_14                      2.20                 1.91  FALSE    
## # … with 13 more rows
print(which(RNA_truetaxa.df$Exclusive))
## [1] 12 21

6 Biomass

6.1 X16s_conc_pg_ul

6.1.1 Does Biomass Vary with Miseq Run

ggplot(metadata_filtered, aes(as.factor(Run_No), X16s_conc_pg_ul, colour=as.factor(Run_No)))+
  geom_boxplot()+
  scale_colour_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  geom_jitter(shape=16, position=position_jitter(0.2))

ggplot(metadata_filtered, aes(x = Sample, y=X16s_conc_pg_ul, fill = Sample_type))+
  geom_bar(stat = "identity")+
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom")+
  labs(x = "Sample", y = bquote('16s rRNA Concentration ('*~pg~ mu~l^-1*')'))

biomass.data <- metadata_filtered %>%
  select(Sample_type, Run_No, X16s_conc_pg_ul, PicoGreen)
hist(biomass.data$X16s_conc_pg_ul)

biomass.data <- biomass.data %>%
  mutate(log10_X16s=log10(X16s_conc_pg_ul+1))%>%
  mutate(sqrt_X16s=sqrt(X16s_conc_pg_ul))

hist(biomass.data$log10_X16s)

hist(biomass.data$sqrt_X16s)

Bm1 <- wilcox.test(biomass.data$X16s_conc_pg_ul ~ biomass.data$Run_No)
## Warning in wilcox.test.default(x = c(0.01, 0.01, 0.01, 0.01, 0.01, 0.02, :
## cannot compute exact p-value with ties
Bm1
## 
##  Wilcoxon rank sum test with continuity correction
## 
## data:  biomass.data$X16s_conc_pg_ul by biomass.data$Run_No
## W = 384, p-value = 0.3244
## alternative hypothesis: true location shift is not equal to 0

6.1.2 Does Biomass vary with Sample Type

ggplot(biomass.data, aes(Sample_type, X16s_conc_pg_ul, fill=Sample_type))+
  stat_boxplot(geom = "errorbar", width = 0.25)+
  geom_boxplot( ) +
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  geom_jitter(shape=16, position=position_jitter(0.2))+
  labs(x="Sample Type", y=bquote('16s rRNA Concentration ('*~pg~ mu~l^-1*')'))+
  #ggtitle("Biomass of STGG, RNA Protect and Environmental Blank Samples") +
  theme_bw()+
  ggsave("Biomass_X16s_Sample_type_BP.pdf", units="in", width=4, height=3, dpi=300)

Bm2 <- aov(X16s_conc_pg_ul ~ Sample_type + Run_No, data = biomass.data)
plot(Bm2)

# Log Transform
Bm2.1 <- aov(log10_X16s ~ Sample_type + Run_No, data = biomass.data)
plot(Bm2.1)

summary(Bm2.1)
##             Df   Sum Sq  Mean Sq F value   Pr(>F)    
## Sample_type  2 0.007584 0.003792   16.90 2.62e-06 ***
## Run_No       1 0.001640 0.001640    7.31   0.0094 ** 
## Residuals   49 0.010995 0.000224                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Non-parametric as no model fits a normal distribution
Bm2.3 <- kruskal.test(X16s_conc_pg_ul ~ Sample_type, data = biomass.data)
Bm2.3 
## 
##  Kruskal-Wallis rank sum test
## 
## data:  X16s_conc_pg_ul by Sample_type
## Kruskal-Wallis chi-squared = 25.459, df = 2, p-value = 2.962e-06
# Perform Dunn post Hoc test to identify difference between groups
Bm2.3.DT <- dunnTest(X16s_conc_pg_ul ~ Sample_type, data = biomass.data, method = "bh")
## Warning: Sample_type was coerced to a factor.
Bm2.3.DT
##            Comparison          Z      P.unadj        P.adj
## 1 blank - rna_protect  0.4176724 6.761866e-01 6.761866e-01
## 2        blank - stgg -4.6640505 3.100453e-06 9.301359e-06
## 3  rna_protect - stgg -3.5637888 3.655401e-04 5.483101e-04

Data could not be transformed to meet assumptions so non-parametric tests were used.

6.1.3 In run 514?

biomass.data_514 <- filter(biomass.data, Run_No==514)
hist(biomass.data_514$X16s_conc_pg_ul)

hist(biomass.data_514)

ggplot(metadata514, aes(Sample_type, X16s_conc_pg_ul, colour=Sample_type))+
  geom_boxplot()+
  scale_colour_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  geom_jitter(shape=16, position=position_jitter(0.2))

Bm3 <- aov(X16s_conc_pg_ul ~ Sample_type, data = metadata514)
Bm3
## Call:
##    aov(formula = X16s_conc_pg_ul ~ Sample_type, data = metadata514)
## 
## Terms:
##                 Sample_type  Residuals
## Sum of Squares   0.04817120 0.03792577
## Deg. of Freedom           1         31
## 
## Residual standard error: 0.03497731
## Estimated effects may be unbalanced

6.1.4 In run 523?

ggplot(metadata523, aes(Sample_type, X16s_conc_pg_ul, colour=Sample_type))+
  geom_boxplot()+
  scale_colour_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  geom_jitter(shape=16, position=position_jitter(0.2))

Bm4 <- aov(X16s_conc_pg_ul ~ Sample_type, data = metadata523)
summary(Bm4)
##             Df  Sum Sq  Mean Sq F value Pr(>F)
## Sample_type  1 0.00314 0.003138   1.685  0.211
## Residuals   18 0.03351 0.001862

6.2 PicoGreen

6.2.1 Does BM vary with MiSeq Run?

ggplot(metadata_filtered, aes(as.factor(Run_No), PicoGreen, colour=as.factor(Run_No)))+
  geom_boxplot()+
  scale_colour_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  geom_jitter(shape=16, position=position_jitter(0.2))

ggplot(metadata_filtered, aes(x = Sample, y=PicoGreen, fill = Sample_type))+
  geom_bar(stat = "identity")+
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom")

Bm5 <- aov(PicoGreen ~ Run_No, data = metadata_filtered)
summary(Bm5)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Run_No       1   18.3   18.27   1.643  0.206
## Residuals   51  567.1   11.12

6.2.2 Does BM vary with Sample Type?

ggplot(metadata_filtered, aes(Sample_type, PicoGreen, colour=Sample_type))+
  geom_boxplot( ) +
  scale_colour_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  geom_jitter(shape=16, position=position_jitter(0.2))

Bm6 <- aov(PicoGreen ~ Sample_type, data = metadata_filtered)
summary(Bm6)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Sample_type  2  106.2   53.12   5.543 0.00669 **
## Residuals   50  479.1    9.58                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Perform tukey HSD post Hoc test to identify difference between groups
Bm6.tukey <- TukeyHSD(Bm6, conf.level = 0.95)
Bm6.tukey
##   Tukey multiple comparisons of means
##     95% family-wise confidence level
## 
## Fit: aov(formula = PicoGreen ~ Sample_type, data = metadata_filtered)
## 
## $Sample_type
##                        diff        lwr       upr     p adj
## rna_protect-blank  4.336962  1.1530735 7.5208495 0.0051412
## stgg-blank         1.368462 -0.8554307 3.5923538 0.3060525
## stgg-rna_protect  -2.968500 -6.2521312 0.3151312 0.0838818

6.2.3 In run 514?

ggplot(metadata514, aes(Sample_type, PicoGreen, colour=Sample_type))+
  geom_boxplot()+
  scale_colour_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  geom_jitter(shape=16, position=position_jitter(0.2))

Bm7 <- aov(PicoGreen ~ Sample_type, data = metadata514)
summary(Bm7)
##             Df Sum Sq Mean Sq F value Pr(>F)
## Sample_type  1   27.5   27.52   2.344  0.136
## Residuals   31  364.0   11.74

6.2.4 In run 523?

ggplot(metadata523, aes(Sample_type, PicoGreen, colour=Sample_type))+
  geom_boxplot()+
  scale_colour_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  geom_jitter(shape=16, position=position_jitter(0.2))

Bm8 <- aov(PicoGreen ~ Sample_type, data = metadata523)
summary(Bm8)
##             Df Sum Sq Mean Sq F value  Pr(>F)   
## Sample_type  1  66.96   66.96   11.09 0.00372 **
## Residuals   18 108.64    6.04                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

6.2.5 Is there a correlation between X16s_conc_pg_ul and PicoGreen?

ggplot(data = metadata_filtered, aes(x=X16s_conc_pg_ul, y=PicoGreen))+
  geom_point()

ggscatter(metadata_filtered, x = "X16s_conc_pg_ul", y = "PicoGreen", add = "reg.line", conf.int = TRUE, cor.coef = TRUE, cor.method = "pearson",)

ggscatter(metadata_filtered, x = "PicoGreen", y = "X16s_conc_pg_ul", add = "reg.line", conf.int = TRUE, cor.coef = TRUE, cor.method = "pearson",)

# Decontamination ## Inspect library Sizes Plot library sizes (number of reads) in each sample as a function of whether that sample was a true positive sample (STGG or RNA Protect) or negative control. As two sample types have been analysed decontam should be done separately for each sample type. ### STGG and RNA/Blanks as negative controls

#inspect library sizes 
library.df <- as.data.frame((sample_data(ps_filtered)))
library.df$LibrarySize <- sample_sums(ps_filtered)
library.df <- library.df[order(library.df$LibrarySize),]
library.df$Index <- seq(nrow(library.df))
ggplot(data=library.df, aes(x=Index, y=LibrarySize, colour=Sample_type)) +
  geom_point()

#Create phlyoseq object containing only STGG and control samples
psSTGG <- subset_samples(ps_filtered, sample_data(ps_filtered)$Sample_type!="rna_protect")

#inspect library sizes 
STGG.df <- as.data.frame((sample_data(psSTGG)))
STGG.df$LibrarySize <- sample_sums(psSTGG)
STGG.df <- STGG.df[order(STGG.df$LibrarySize),]
STGG.df$Index <- seq(nrow(STGG.df))
ggplot(data=STGG.df, aes(x=Index, y=LibrarySize, colour=Sample_type)) +
  geom_point()

Whilst the majority of STGG samples fall between 1250 and 5000 reads, blanks were found across all sample sizes accounting for the lowest (~0 reads) and the highest (10,000 reads). No obvious trend or distinction between true samples and controls was observed.

6.3 Frequency

contamdf.freq <- isContaminant(psSTGG, method = "frequency", conc = "X16s_conc_pg_ul", batch = "Run_No")
head(contamdf.freq)
##                      freq prev    p.freq p.prev         p contaminant
## Tepidimonas_1  0.26088543   33 0.9999124     NA 0.9999124       FALSE
## Curvibacter_2  0.07605064   13 0.9999993     NA 0.9999993       FALSE
## Thermus_3      0.07383025   36 0.8566482     NA 0.8566482       FALSE
## Schlegelella_4 0.02448996   13 0.9999182     NA 0.9999182       FALSE
## Thermus_5      0.05072835   30 0.9999725     NA 0.9999725       FALSE
## Caulobacter_6  0.01283392   13 0.9982599     NA 0.9982599       FALSE
table(contamdf.freq$contaminant)
## 
## FALSE  TRUE 
##   231    18
head(which(contamdf.freq$contaminant))
## [1] 19 21 24 36 53 55

The frequency method has identified 13 ASVs as potential non-stgg contaminants. Compare non contaminant ASV (1) with contaminant ASV (19).

set.seed(10)
plot_frequency(psSTGG, taxa_names(psSTGG)[c(19,1)], conc = "PicoGreen") +
  xlab("DNA Concentration (")
## Warning: Transformation introduced infinite values in continuous y-axis

set.seed(67)
plot_frequency(psSTGG, taxa_names(psSTGG)[sample(which(contamdf.freq$contaminant),2)], conc="PicoGreen") +
    xlab("DNA Concentration (PicoGreen fluorescent intensity)")
## Warning: Transformation introduced infinite values in continuous y-axis

6.4 Prevalence

sample_data(psSTGG)$is.neg <- sample_data(psSTGG)$Sample_type == "blank"
contamdf.prev <- isContaminant(psSTGG, method="prevalence", neg="is.neg", threshold = 0.1)
table(contamdf.prev$contaminant)
## 
## FALSE  TRUE 
##   194    55
head(which(contamdf.prev$contaminant))
## [1]  2  4  6  7  9 11

6.4.1 Inspect the number of times these taxa were observed in positive and negative samples

# Make phyloseq object of presence-absence in negative controls and true samples
ps.pa.STGG <- transform_sample_counts(psSTGG, function(abund) 1*(abund>0))
ps.pa.neg.STGG <- prune_samples(sample_data(ps.pa.STGG)$Sample_type == "blank", ps.pa.STGG)
ps.pa.pos.STGG <- prune_samples(sample_data(ps.pa.STGG)$Sample_type == "stgg", ps.pa.STGG)
# Make data.frame of prevalence in positive and negative samples
df.pa.STGG <- data.frame(pa.pos.STGG=taxa_sums(ps.pa.pos.STGG), pa.neg.STGG=taxa_sums(ps.pa.neg.STGG),
                      contaminant=contamdf.prev$contaminant)
ggplot(data=df.pa.STGG, aes(x=pa.neg.STGG, y=pa.pos.STGG, color=contaminant)) + geom_point() +
  xlab("Prevalence (Enivronental Controls)") + ylab("Prevalence (STGG Samples)")

## Decontam with both sample types

#Add column to sample data that assgins logic to control samples

sample_data(ps_filtered)$is.neg <- sample_data(ps_filtered)$Sample_type == "blank"

#Identify true (STGG/RNA Protect)
contamdf.prev.all <- isContaminant(ps_filtered, neg ="is.neg", method = "prevalence", threshold = 0.1, batch = sample_data(ps_filtered)$Run_No)
head(which(contamdf.prev.all$contaminant))
## [1] 29 36 39 44 46 49

6.5 isNnotContam

As samples are of low biomass and a large proportion of sequences are likely to be contaminants isNotContaminant {decontam} was used to identify true (STGG) reads from reads derived from environmental contamination.

#Add column to sample data that assgins logic to control samples

sample_data(ps_filtered)$is.neg <- sample_data(ps_filtered)$Sample_type != "stgg"

#Identify true (STGG)
notcontamdf <- isNotContaminant(ps_filtered, neg ="is.neg", threshold = 0.5, detailed = TRUE)
table(notcontamdf$not.contaminant)
## 
## FALSE  TRUE 
##    91   158
head(which(notcontamdf$not.contaminant))
## [1]  1  3  5  8 10 12
print(notcontamdf)
##                                                                freq prev p.freq
## Tepidimonas_1                                          2.264289e-01   33     NA
## Curvibacter_2                                          1.009841e-01   20     NA
## Thermus_3                                              8.688962e-02   43     NA
## Schlegelella_4                                         2.852376e-02   19     NA
## Thermus_5                                              4.402838e-02   30     NA
## Caulobacter_6                                          1.625848e-02   19     NA
## Comamonadaceae_7                                       1.447510e-02   19     NA
## Sphingomonas_8                                         4.107705e-02   28     NA
## Bosea_9                                                1.262668e-02   19     NA
## Thermus_thermophilus_10                                1.408733e-02   23     NA
## Sphingobium_11                                         9.735880e-03   20     NA
## Pseudomonas_12                                         1.299774e-02   41     NA
## Methylobacterium_Methylorubrum_13                      2.293551e-02   28     NA
## Ottowia_14                                             7.588832e-03   15     NA
## Azospirillum_15                                        7.557659e-03   18     NA
## Meiothermus_silvanus_16                                8.396799e-03   19     NA
## Staphylococcus_17                                      1.600792e-02   33     NA
## Nitriliruptoraceae_18                                  1.665024e-02   47     NA
## Paucibacter_19                                         2.561865e-02   48     NA
## Brevundimonas_20                                       7.191409e-03   19     NA
## Delftia_21                                             1.743665e-02   21     NA
## Methylobacterium_Methylorubrum_22                      1.023565e-02   20     NA
## Methyloversatilis_23                                   4.577730e-03   19     NA
## Bradyrhizobium_24                                      1.873942e-02   27     NA
## Comamonas_25                                           2.631675e-03   10     NA
## Methylobacterium_Methylorubrum_26                      8.576104e-03   17     NA
## Noviherbaspirillum_suwonense_27                        9.789757e-03   22     NA
## Brevundimonas_28                                       3.081368e-03   12     NA
## Xanthobacter_autotrophicus_29                          2.588114e-03   17     NA
## Dolosigranulum_pigrum_30                               5.838612e-03   21     NA
## Lactococcus_31                                         4.620817e-03   17     NA
## Methylobacterium_Methylorubrum_32                      4.634599e-03   10     NA
## Pseudomonas_33                                         8.815062e-03   20     NA
## Streptococcus_34                                       3.945675e-03   13     NA
## Corynebacterium_35                                     6.358113e-03   12     NA
## Bosea_36                                               4.360623e-03   17     NA
## Moraxella_37                                           4.422753e-03   15     NA
## Bacteriovorax_stolpii_38                               2.521520e-03   15     NA
## Bosea_vestrisii_39                                     1.640185e-03    8     NA
## Phenylobacterium_muchangponense_40                     1.853456e-03   13     NA
## Rhodopseudomonas_41                                    4.630046e-03   13     NA
## Sphingomonas_koreensis_42                              1.756416e-03   18     NA
## Achromobacter_43                                       3.173297e-03   16     NA
## Corynebacterium_44                                     5.036577e-03   11     NA
## Pseudomonas_japonica_45                                2.926962e-03   17     NA
## Aquabacterium_parvum_46                                2.394551e-03   15     NA
## Aquabacterium_47                                       1.199956e-03    7     NA
## Sphingopyxis_48                                        1.027747e-03    8     NA
## Thiobacillus_thioparus_49                              1.156326e-03   13     NA
## Thermus_brockianus_50                                  9.803232e-04    5     NA
## Staphylococcus_51                                      1.288305e-03    4     NA
## Aquabacterium_52                                       1.288473e-03   10     NA
## Brevundimonas_53                                       1.211565e-03    6     NA
## Haemophilus_54                                         1.868575e-03    2     NA
## Burkholderia_Caballeronia_Paraburkholderia_55          4.099069e-03   12     NA
## Cloacibacterium_56                                     1.076944e-03   10     NA
## Blastococcus_57                                        2.135012e-03   10     NA
## Meiothermus_58                                         1.502747e-03    9     NA
## Corynebacterium_59                                     6.413893e-04    4     NA
## Alcaligenes_60                                         7.473932e-04    8     NA
## Methylobacterium_Methylorubrum_61                      3.479678e-03   14     NA
## Corynebacterium_62                                     2.375905e-03   11     NA
## Neisseria_63                                           1.624652e-03    5     NA
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  3.016940e-03   12     NA
## Brevundimonas_kwangchunensis_65                        1.256267e-03    7     NA
## Ralstonia_66                                           2.097186e-03   10     NA
## Cupriavidus_gilardii_67                                7.389218e-04    7     NA
## Streptococcus_69                                       2.880323e-03    6     NA
## Enhydrobacter_70                                       1.413665e-03    9     NA
## Microbacteriaceae_71                                   5.021637e-04    5     NA
## Afipia_72                                              2.617811e-03    9     NA
## Bosea_73                                               6.876345e-04    7     NA
## Brevundimonas_74                                       1.969040e-03    8     NA
## Brachymonas_75                                         5.356044e-04    5     NA
## Fluviicola_76                                          5.439258e-04    7     NA
## Skermanella_aerolata_77                                9.277934e-04    7     NA
## Cupriavidus_78                                         5.662280e-04    4     NA
## Acinetobacter_79                                       1.828253e-03    9     NA
## Pseudarthrobacter_80                                   1.116450e-03    7     NA
## Sphingobium_81                                         9.504694e-04    4     NA
## Limnohabitans_82                                       2.149204e-03    4     NA
## Bacillus_83                                            1.258702e-03    2     NA
## Sphingomonadaceae_84                                   5.693857e-04    8     NA
## Corynebacterium_matruchotii_85                         4.487368e-04    2     NA
## Pseudomonas_86                                         6.847992e-04    6     NA
## Psychroglaciecola_87                                   1.486552e-03    8     NA
## Acinetobacter_88                                       6.740599e-04    6     NA
## Proteus_89                                             5.695317e-04    7     NA
## Streptococcus_90                                       3.061191e-03    6     NA
## Methylobacterium_Methylorubrum_91                      7.222484e-04    4     NA
## Caulobacteraceae_92                                    4.405513e-04    4     NA
## Escherichia/Shigella_93                                6.661923e-04    9     NA
## Halomonas_94                                           1.100791e-03   10     NA
## Nocardioides_95                                        2.243128e-03    5     NA
## Bosea_96                                               8.935583e-04    5     NA
## Micrococcus_97                                         1.401391e-03    7     NA
## Methylobacillus_98                                     3.603298e-04    7     NA
## Acinetobacter_100                                      2.137697e-04    3     NA
## Phenylobacterium_mobile_101                            1.123234e-03    7     NA
## Anoxybacillus_102                                      4.118755e-04    9     NA
## Variovorax_paradoxus_103                               5.553379e-04    3     NA
## Caulobacter_104                                        1.718234e-03    8     NA
## Pseudomonas_105                                        3.586539e-04    5     NA
## Tepidiphilus_succinatimandens_106                      2.995392e-04    4     NA
## Haliangium_107                                         3.043686e-04    7     NA
## Dietzia_109                                            5.417954e-04    4     NA
## Reyranella_massiliensis_110                            2.708226e-04    6     NA
## Massilia_111                                           1.190506e-03    8     NA
## Methylopila_oligotropha_112                            4.412900e-04    2     NA
## Haemophilus_114                                        8.460066e-04    6     NA
## Stenotrophomonas_115                                   2.566185e-04    4     NA
## Sphingomonas_koreensis_116                             6.037061e-04    6     NA
## Asticcacaulis_excentricus_117                          2.465046e-04    6     NA
## Neisseria_118                                          7.104776e-04    5     NA
## Actinomyces_119                                        7.964368e-04    6     NA
## Sphingobium_yanoikuyae_120                             2.671516e-04    4     NA
## Ralstonia_121                                          6.265734e-04    3     NA
## Sphingopyxis_122                                       4.629217e-04    4     NA
## Yonghaparkia_123                                       2.531714e-04    4     NA
## Brevundimonas_124                                      2.240993e-04    3     NA
## Brevundimonas_126                                      5.481631e-04    8     NA
## Anoxybacillus_127                                      7.565009e-04    4     NA
## Tepidimonas_128                                        2.695019e-04    5     NA
## Stenotrophomonas_129                                   5.516733e-04    5     NA
## Providencia_130                                        1.438536e-04    3     NA
## Blastomonas_131                                        2.825748e-04    4     NA
## PMMR1_132                                              3.711265e-04    5     NA
## Haemophilus_133                                        1.068683e-03    2     NA
## Mesorhizobium_134                                      2.277644e-03    5     NA
## Brevundimonas_135                                      8.638955e-04    4     NA
## Sphingobium_137                                        1.138941e-03    6     NA
## Vulcaniibacterium_139                                  4.756674e-04    5     NA
## Klenkia_140                                            5.342252e-04    4     NA
## Sphingomonas_141                                       4.960657e-04    5     NA
## Lawsonella_clevelandensis_143                          2.501346e-03    2     NA
## Ellin6055_144                                          2.140471e-04    2     NA
## Pseudomonas_145                                        4.740453e-04    4     NA
## Devosia_neptuniae_146                                  2.344607e-04    4     NA
## Janibacter_147                                         2.727322e-04    3     NA
## Devosia_148                                            3.730491e-04    4     NA
## Brevundimonas_149                                      1.115734e-03    5     NA
## Candidatus_Paracaedibacter_150                         2.866392e-04    3     NA
## Paucibacter_151                                        2.361778e-03    2     NA
## Meiothermus_152                                        3.699185e-04    4     NA
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 2.141639e-03    3     NA
## Pseudomonas_154                                        8.996049e-04    5     NA
## Rhodopseudomonas_155                                   4.514538e-04    5     NA
## Rhodopseudomonas_156                                   5.037061e-04    4     NA
## Frankiales_158                                         2.928379e-04    5     NA
## Novosphingobium_159                                    1.034461e-03    4     NA
## Sphingosinicella_163                                   5.277515e-04    3     NA
## Flavihumibacter_165                                    9.101061e-05    2     NA
## Duganella_166                                          9.790435e-04    5     NA
## Granulicatella_167                                     2.415129e-04    3     NA
## Sphingoaurantiacus_polygranulatus_168                  3.988027e-04    4     NA
## Caulobacter_169                                        2.436415e-04    4     NA
## Finegoldia_171                                         1.403796e-03    3     NA
## Acinetobacter_lwoffii_175                              4.388196e-04    6     NA
## Methylopilaceae_176                                    2.930608e-04    5     NA
## Halomonas_178                                          2.424020e-04    2     NA
## Abiotrophia_defectiva_181                              2.274780e-04    2     NA
## Caulobacteraceae_182                                   1.215108e-04    2     NA
## Sphingomonas_184                                       6.956600e-04    2     NA
## Herbiconiux_185                                        2.414732e-04    3     NA
## Phreatobacter_oligotrophus_186                         1.427478e-04    3     NA
## Alphaproteobacteria_187                                1.187981e-04    2     NA
## Leifsonia_188                                          3.335420e-04    3     NA
## Microvirga_189                                         2.545846e-04    2     NA
## Porphyromonas_gingivalis_193                           3.186010e-04    3     NA
## Bdellovibrio_194                                       2.998722e-04    5     NA
## Streptococcus_195                                      4.069771e-04    2     NA
## Enterobacterales_198                                   7.334188e-04    2     NA
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199 6.336171e-04    4     NA
## Brachybacterium_200                                    2.152676e-03    3     NA
## Burkholderia_Caballeronia_Paraburkholderia_201         1.715866e-04    2     NA
## Galbitalea_203                                         3.198893e-04    2     NA
## Sphingobium_205                                        2.113321e-04    2     NA
## Paracoccus_206                                         2.058113e-04    3     NA
## Pyrinomonas_207                                        1.174753e-04    4     NA
## Brevibacillus_208                                      1.127366e-04    4     NA
## Luteimonas_209                                         2.274547e-04    3     NA
## Bosea_211                                              7.081637e-05    2     NA
## Micrococcaceae_212                                     3.401229e-04    2     NA
## Gemella_213                                            2.162752e-04    3     NA
## Massilia_214                                           2.700437e-04    2     NA
## Streptococcus_216                                      1.398308e-04    2     NA
## Patulibacter_minatonensis_217                          1.576705e-04    4     NA
## Acidovorax_218                                         1.939312e-04    2     NA
## Alloprevotella_219                                     1.955154e-04    3     NA
## Novispirillum_220                                      1.131025e-04    3     NA
## Rhodococcus_221                                        2.200130e-04    3     NA
## Fimbriiglobus_223                                      2.148883e-04    2     NA
## Gammaproteobacteria_226                                1.566046e-04    3     NA
## Aquabacterium_228                                      1.600243e-04    2     NA
## Acetobacteraceae_230                                   3.047097e-04    3     NA
## Bosea_231                                              5.960337e-05    2     NA
## Tepidiphilus_232                                       1.995040e-04    3     NA
## Aerococcus_233                                         1.563555e-04    3     NA
## Geodermatophilus_234                                   1.965957e-04    2     NA
## Limnobacter_thiooxidans_236                            1.601710e-04    2     NA
## Methylobacterium_Methylorubrum_240                     4.744278e-04    2     NA
## Hansschlegelia_242                                     1.968406e-04    2     NA
## Roseomonas_cervicalis_243                              1.100142e-04    3     NA
## Legionella_lytica_244                                  1.189608e-04    3     NA
## Klebsiella_245                                         2.269239e-04    3     NA
## Methylobacterium_Methylorubrum_246                     3.654402e-04    2     NA
## Prevotella_histicola_247                               2.056466e-04    2     NA
## Prevotella_248                                         9.410058e-05    2     NA
## Porphyromonas_254                                      1.018007e-04    2     NA
## Belnapia_rosea_259                                     1.077757e-03    2     NA
## Methylophilus_263                                      1.307617e-04    3     NA
## Staphylococcus_264                                     2.302541e-04    2     NA
## Methylobacterium_Methylorubrum_265                     9.333568e-05    2     NA
## Turicella_otitidis_268                                 1.591035e-04    2     NA
## Quadrisphaera_271                                      1.421203e-04    2     NA
## Caulobacter_272                                        1.589604e-04    2     NA
## Stenotrophomonas_277                                   7.202095e-05    2     NA
## Frankiales_280                                         9.085665e-05    2     NA
## Stenotrophomonas_282                                   6.757826e-04    3     NA
## Phenylobacterium_286                                   9.862635e-05    2     NA
## Devosia_288                                            3.587238e-04    3     NA
## Pseudoxanthomonas_mexicana_289                         1.165694e-04    2     NA
## Clostridium_sensu_stricto_1_293                        2.822203e-04    2     NA
## Mesorhizobium_294                                      2.055011e-04    2     NA
## KD4_96_297                                             1.355725e-04    2     NA
## Kocuria_299                                            1.173779e-04    2     NA
## Streptococcus_303                                      2.532132e-04    2     NA
## Novosphingobium_311                                    4.888161e-04    2     NA
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314 1.579087e-04    2     NA
## Vulcaniibacterium_thermophilum_321                     1.127475e-04    2     NA
## Kocuria_330                                            1.266236e-04    2     NA
## DSSD61_338                                             1.593818e-04    2     NA
## Dietzia_timorensis_339                                 1.424384e-04    2     NA
## Ruminiclostridium_341                                  4.361371e-04    2     NA
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 2.247268e-04    2     NA
## Paenarthrobacter_344                                   2.655507e-04    2     NA
## Candidatus_Paracaedibacter_347                         1.317488e-04    3     NA
## Veillonella_348                                        1.659913e-04    2     NA
## Cnuella_349                                            1.373447e-04    3     NA
## UCG_005_354                                            8.460448e-05    2     NA
## Cellulomonas_360                                       2.327451e-04    2     NA
## Acetitomaculum_362                                     1.390598e-04    3     NA
## Thermomonas_hydrothermalis_363                         8.074141e-05    2     NA
## Ensifer_365                                            1.524687e-04    2     NA
## Sphingomonas_367                                       1.872970e-04    2     NA
## Burkholderia_Caballeronia_Paraburkholderia_374         1.141369e-04    2     NA
## Pedobacter_381                                         1.886407e-04    3     NA
## Hydrocarboniphaga_389                                  7.451606e-04    3     NA
## Pseudoxanthomonas_447                                  4.204920e-05    2     NA
##                                                              p.prev
## Tepidimonas_1                                          1.895346e-05
## Curvibacter_2                                          9.999810e-01
## Thermus_3                                              2.452585e-02
## Schlegelella_4                                         9.999595e-01
## Thermus_5                                              1.458329e-06
## Caulobacter_6                                          9.999595e-01
## Comamonadaceae_7                                       9.999595e-01
## Sphingomonas_8                                         3.336824e-06
## Bosea_9                                                9.999595e-01
## Thermus_thermophilus_10                                3.067459e-10
## Sphingobium_11                                         9.984145e-01
## Pseudomonas_12                                         1.641610e-01
## Methylobacterium_Methylorubrum_13                      4.139547e-05
## Ottowia_14                                             9.994154e-01
## Azospirillum_15                                        9.999168e-01
## Meiothermus_silvanus_16                                9.999595e-01
## Staphylococcus_17                                      7.112495e-01
## Nitriliruptoraceae_18                                  2.412216e-02
## Paucibacter_19                                         2.252986e-01
## Brevundimonas_20                                       9.999595e-01
## Delftia_21                                             4.013900e-03
## Methylobacterium_Methylorubrum_22                      2.404425e-05
## Methyloversatilis_23                                   9.999595e-01
## Bradyrhizobium_24                                      1.702994e-05
## Comamonas_25                                           9.976265e-01
## Methylobacterium_Methylorubrum_26                      8.489774e-06
## Noviherbaspirillum_suwonense_27                        1.822152e-04
## Brevundimonas_28                                       9.993350e-01
## Xanthobacter_autotrophicus_29                          9.985774e-01
## Dolosigranulum_pigrum_30                               7.954082e-01
## Lactococcus_31                                         4.602183e-10
## Methylobacterium_Methylorubrum_32                      6.606553e-02
## Pseudomonas_33                                         4.214956e-02
## Streptococcus_34                                       5.392733e-03
## Corynebacterium_35                                     1.725643e-01
## Bosea_36                                               4.794449e-01
## Moraxella_37                                           9.129339e-01
## Bacteriovorax_stolpii_38                               9.994154e-01
## Bosea_vestrisii_39                                     9.921676e-01
## Phenylobacterium_muchangponense_40                     9.996594e-01
## Rhodopseudomonas_41                                    7.094566e-04
## Sphingomonas_koreensis_42                              9.149279e-01
## Achromobacter_43                                       9.996850e-01
## Corynebacterium_44                                     9.251069e-01
## Pseudomonas_japonica_45                                8.489774e-06
## Aquabacterium_parvum_46                                9.955673e-01
## Aquabacterium_47                                       9.861426e-01
## Sphingopyxis_48                                        9.921676e-01
## Thiobacillus_thioparus_49                              9.996594e-01
## Thermus_brockianus_50                                  2.701342e-03
## Staphylococcus_51                                      6.739349e-01
## Aquabacterium_52                                       9.976265e-01
## Brevundimonas_53                                       9.758778e-01
## Haemophilus_54                                         6.894049e-02
## Burkholderia_Caballeronia_Paraburkholderia_55          1.725643e-01
## Cloacibacterium_56                                     2.010901e-01
## Blastococcus_57                                        1.455012e-02
## Meiothermus_58                                         9.599675e-01
## Corynebacterium_59                                     3.163152e-01
## Alcaligenes_60                                         9.921676e-01
## Methylobacterium_Methylorubrum_61                      1.933266e-02
## Corynebacterium_62                                     1.122213e-01
## Neisseria_63                                           2.701342e-03
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  1.348270e-02
## Brevundimonas_kwangchunensis_65                        2.514547e-04
## Ralstonia_66                                           6.606553e-02
## Cupriavidus_gilardii_67                                9.861426e-01
## Streptococcus_69                                       8.483750e-01
## Enhydrobacter_70                                       3.407175e-02
## Microbacteriaceae_71                                   4.514882e-01
## Afipia_72                                              1.295108e-01
## Bosea_73                                               9.861426e-01
## Brevundimonas_74                                       2.334002e-01
## Brachymonas_75                                         9.586477e-01
## Fluviicola_76                                          9.861426e-01
## Skermanella_aerolata_77                                4.651912e-03
## Cupriavidus_78                                         9.301289e-01
## Acinetobacter_79                                       3.407175e-02
## Pseudarthrobacter_80                                   2.514547e-04
## Sphingobium_81                                         8.272859e-03
## Limnohabitans_82                                       8.078204e-02
## Bacillus_83                                            3.773585e-01
## Sphingomonadaceae_84                                   4.978753e-01
## Corynebacterium_matruchotii_85                         6.894049e-02
## Pseudomonas_86                                         9.758778e-01
## Psychroglaciecola_87                                   1.457344e-02
## Acinetobacter_88                                       7.968958e-02
## Proteus_89                                             9.861426e-01
## Streptococcus_90                                       7.968958e-02
## Methylobacterium_Methylorubrum_91                      8.272859e-03
## Caulobacteraceae_92                                    6.739349e-01
## Escherichia/Shigella_93                                3.308276e-01
## Halomonas_94                                           6.606553e-02
## Nocardioides_95                                        1.659935e-01
## Bosea_96                                               2.701342e-03
## Micrococcus_97                                         1.476542e-01
## Methylobacillus_98                                     9.861426e-01
## Acinetobacter_100                                      8.835482e-01
## Phenylobacterium_mobile_101                            3.535453e-02
## Anoxybacillus_102                                      1.895021e-05
## Variovorax_paradoxus_103                               2.433194e-02
## Caulobacter_104                                        1.457344e-02
## Pseudomonas_105                                        9.586477e-01
## Tepidiphilus_succinatimandens_106                      9.301289e-01
## Haliangium_107                                         9.861426e-01
## Dietzia_109                                            8.078204e-02
## Reyranella_massiliensis_110                            9.758778e-01
## Massilia_111                                           7.383803e-02
## Methylopila_oligotropha_112                            6.894049e-02
## Haemophilus_114                                        7.968958e-02
## Stenotrophomonas_115                                   6.739349e-01
## Sphingomonas_koreensis_116                             9.758778e-01
## Asticcacaulis_excentricus_117                          9.758778e-01
## Neisseria_118                                          1.659935e-01
## Actinomyces_119                                        5.756639e-01
## Sphingobium_yanoikuyae_120                             9.301289e-01
## Ralstonia_121                                          5.417058e-01
## Sphingopyxis_122                                       9.301289e-01
## Yonghaparkia_123                                       8.272859e-03
## Brevundimonas_124                                      8.835482e-01
## Brevundimonas_126                                      9.921676e-01
## Anoxybacillus_127                                      8.078204e-02
## Tepidimonas_128                                        9.586477e-01
## Stenotrophomonas_129                                   1.659935e-01
## Providencia_130                                        8.835482e-01
## Blastomonas_131                                        9.301289e-01
## PMMR1_132                                              9.586477e-01
## Haemophilus_133                                        3.773585e-01
## Mesorhizobium_134                                      1.659935e-01
## Brevundimonas_135                                      8.078204e-02
## Sphingobium_137                                        7.968958e-02
## Vulcaniibacterium_139                                  9.586477e-01
## Klenkia_140                                            8.272859e-03
## Sphingomonas_141                                       1.659935e-01
## Lawsonella_clevelandensis_143                          8.084180e-01
## Ellin6055_144                                          3.773585e-01
## Pseudomonas_145                                        8.272859e-03
## Devosia_neptuniae_146                                  8.272859e-03
## Janibacter_147                                         2.433194e-02
## Devosia_148                                            9.301289e-01
## Brevundimonas_149                                      1.659935e-01
## Candidatus_Paracaedibacter_150                         8.835482e-01
## Paucibacter_151                                        8.084180e-01
## Meiothermus_152                                        8.272859e-03
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 5.417058e-01
## Pseudomonas_154                                        1.659935e-01
## Rhodopseudomonas_155                                   3.326027e-02
## Rhodopseudomonas_156                                   8.078204e-02
## Frankiales_158                                         1.659935e-01
## Novosphingobium_159                                    8.078204e-02
## Sphingosinicella_163                                   8.835482e-01
## Flavihumibacter_165                                    8.084180e-01
## Duganella_166                                          3.326027e-02
## Granulicatella_167                                     1.824895e-01
## Sphingoaurantiacus_polygranulatus_168                  8.272859e-03
## Caulobacter_169                                        8.272859e-03
## Finegoldia_171                                         1.824895e-01
## Acinetobacter_lwoffii_175                              7.968958e-02
## Methylopilaceae_176                                    2.701342e-03
## Halomonas_178                                          3.773585e-01
## Abiotrophia_defectiva_181                              6.894049e-02
## Caulobacteraceae_182                                   8.084180e-01
## Sphingomonas_184                                       8.084180e-01
## Herbiconiux_185                                        2.433194e-02
## Phreatobacter_oligotrophus_186                         8.835482e-01
## Alphaproteobacteria_187                                8.084180e-01
## Leifsonia_188                                          2.433194e-02
## Microvirga_189                                         6.894049e-02
## Porphyromonas_gingivalis_193                           2.433194e-02
## Bdellovibrio_194                                       9.586477e-01
## Streptococcus_195                                      3.773585e-01
## Enterobacterales_198                                   6.894049e-02
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199 8.078204e-02
## Brachybacterium_200                                    5.417058e-01
## Burkholderia_Caballeronia_Paraburkholderia_201         6.894049e-02
## Galbitalea_203                                         6.894049e-02
## Sphingobium_205                                        8.084180e-01
## Paracoccus_206                                         5.417058e-01
## Pyrinomonas_207                                        9.301289e-01
## Brevibacillus_208                                      8.272859e-03
## Luteimonas_209                                         2.433194e-02
## Bosea_211                                              8.084180e-01
## Micrococcaceae_212                                     3.773585e-01
## Gemella_213                                            1.824895e-01
## Massilia_214                                           6.894049e-02
## Streptococcus_216                                      3.773585e-01
## Patulibacter_minatonensis_217                          8.272859e-03
## Acidovorax_218                                         6.894049e-02
## Alloprevotella_219                                     1.824895e-01
## Novispirillum_220                                      8.835482e-01
## Rhodococcus_221                                        5.417058e-01
## Fimbriiglobus_223                                      6.894049e-02
## Gammaproteobacteria_226                                8.835482e-01
## Aquabacterium_228                                      6.894049e-02
## Acetobacteraceae_230                                   1.824895e-01
## Bosea_231                                              8.084180e-01
## Tepidiphilus_232                                       8.835482e-01
## Aerococcus_233                                         2.433194e-02
## Geodermatophilus_234                                   3.773585e-01
## Limnobacter_thiooxidans_236                            3.773585e-01
## Methylobacterium_Methylorubrum_240                     6.894049e-02
## Hansschlegelia_242                                     6.894049e-02
## Roseomonas_cervicalis_243                              8.835482e-01
## Legionella_lytica_244                                  8.835482e-01
## Klebsiella_245                                         1.824895e-01
## Methylobacterium_Methylorubrum_246                     6.894049e-02
## Prevotella_histicola_247                               6.894049e-02
## Prevotella_248                                         6.894049e-02
## Porphyromonas_254                                      6.894049e-02
## Belnapia_rosea_259                                     3.773585e-01
## Methylophilus_263                                      2.433194e-02
## Staphylococcus_264                                     3.773585e-01
## Methylobacterium_Methylorubrum_265                     8.084180e-01
## Turicella_otitidis_268                                 6.894049e-02
## Quadrisphaera_271                                      6.894049e-02
## Caulobacter_272                                        8.084180e-01
## Stenotrophomonas_277                                   3.773585e-01
## Frankiales_280                                         3.773585e-01
## Stenotrophomonas_282                                   5.417058e-01
## Phenylobacterium_286                                   6.894049e-02
## Devosia_288                                            2.433194e-02
## Pseudoxanthomonas_mexicana_289                         6.894049e-02
## Clostridium_sensu_stricto_1_293                        3.773585e-01
## Mesorhizobium_294                                      3.773585e-01
## KD4_96_297                                             6.894049e-02
## Kocuria_299                                            6.894049e-02
## Streptococcus_303                                      6.894049e-02
## Novosphingobium_311                                    8.084180e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314 6.894049e-02
## Vulcaniibacterium_thermophilum_321                     8.084180e-01
## Kocuria_330                                            6.894049e-02
## DSSD61_338                                             3.773585e-01
## Dietzia_timorensis_339                                 3.773585e-01
## Ruminiclostridium_341                                  3.773585e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 3.773585e-01
## Paenarthrobacter_344                                   3.773585e-01
## Candidatus_Paracaedibacter_347                         2.433194e-02
## Veillonella_348                                        6.894049e-02
## Cnuella_349                                            2.433194e-02
## UCG_005_354                                            6.894049e-02
## Cellulomonas_360                                       3.773585e-01
## Acetitomaculum_362                                     2.433194e-02
## Thermomonas_hydrothermalis_363                         6.894049e-02
## Ensifer_365                                            6.894049e-02
## Sphingomonas_367                                       6.894049e-02
## Burkholderia_Caballeronia_Paraburkholderia_374         6.894049e-02
## Pedobacter_381                                         2.433194e-02
## Hydrocarboniphaga_389                                  5.417058e-01
## Pseudoxanthomonas_447                                  6.894049e-02
##                                                                   p
## Tepidimonas_1                                          1.895346e-05
## Curvibacter_2                                          9.999810e-01
## Thermus_3                                              2.452585e-02
## Schlegelella_4                                         9.999595e-01
## Thermus_5                                              1.458329e-06
## Caulobacter_6                                          9.999595e-01
## Comamonadaceae_7                                       9.999595e-01
## Sphingomonas_8                                         3.336824e-06
## Bosea_9                                                9.999595e-01
## Thermus_thermophilus_10                                3.067459e-10
## Sphingobium_11                                         9.984145e-01
## Pseudomonas_12                                         1.641610e-01
## Methylobacterium_Methylorubrum_13                      4.139547e-05
## Ottowia_14                                             9.994154e-01
## Azospirillum_15                                        9.999168e-01
## Meiothermus_silvanus_16                                9.999595e-01
## Staphylococcus_17                                      7.112495e-01
## Nitriliruptoraceae_18                                  2.412216e-02
## Paucibacter_19                                         2.252986e-01
## Brevundimonas_20                                       9.999595e-01
## Delftia_21                                             4.013900e-03
## Methylobacterium_Methylorubrum_22                      2.404425e-05
## Methyloversatilis_23                                   9.999595e-01
## Bradyrhizobium_24                                      1.702994e-05
## Comamonas_25                                           9.976265e-01
## Methylobacterium_Methylorubrum_26                      8.489774e-06
## Noviherbaspirillum_suwonense_27                        1.822152e-04
## Brevundimonas_28                                       9.993350e-01
## Xanthobacter_autotrophicus_29                          9.985774e-01
## Dolosigranulum_pigrum_30                               7.954082e-01
## Lactococcus_31                                         4.602183e-10
## Methylobacterium_Methylorubrum_32                      6.606553e-02
## Pseudomonas_33                                         4.214956e-02
## Streptococcus_34                                       5.392733e-03
## Corynebacterium_35                                     1.725643e-01
## Bosea_36                                               4.794449e-01
## Moraxella_37                                           9.129339e-01
## Bacteriovorax_stolpii_38                               9.994154e-01
## Bosea_vestrisii_39                                     9.921676e-01
## Phenylobacterium_muchangponense_40                     9.996594e-01
## Rhodopseudomonas_41                                    7.094566e-04
## Sphingomonas_koreensis_42                              9.149279e-01
## Achromobacter_43                                       9.996850e-01
## Corynebacterium_44                                     9.251069e-01
## Pseudomonas_japonica_45                                8.489774e-06
## Aquabacterium_parvum_46                                9.955673e-01
## Aquabacterium_47                                       9.861426e-01
## Sphingopyxis_48                                        9.921676e-01
## Thiobacillus_thioparus_49                              9.996594e-01
## Thermus_brockianus_50                                  2.701342e-03
## Staphylococcus_51                                      6.739349e-01
## Aquabacterium_52                                       9.976265e-01
## Brevundimonas_53                                       9.758778e-01
## Haemophilus_54                                         6.894049e-02
## Burkholderia_Caballeronia_Paraburkholderia_55          1.725643e-01
## Cloacibacterium_56                                     2.010901e-01
## Blastococcus_57                                        1.455012e-02
## Meiothermus_58                                         9.599675e-01
## Corynebacterium_59                                     3.163152e-01
## Alcaligenes_60                                         9.921676e-01
## Methylobacterium_Methylorubrum_61                      1.933266e-02
## Corynebacterium_62                                     1.122213e-01
## Neisseria_63                                           2.701342e-03
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  1.348270e-02
## Brevundimonas_kwangchunensis_65                        2.514547e-04
## Ralstonia_66                                           6.606553e-02
## Cupriavidus_gilardii_67                                9.861426e-01
## Streptococcus_69                                       8.483750e-01
## Enhydrobacter_70                                       3.407175e-02
## Microbacteriaceae_71                                   4.514882e-01
## Afipia_72                                              1.295108e-01
## Bosea_73                                               9.861426e-01
## Brevundimonas_74                                       2.334002e-01
## Brachymonas_75                                         9.586477e-01
## Fluviicola_76                                          9.861426e-01
## Skermanella_aerolata_77                                4.651912e-03
## Cupriavidus_78                                         9.301289e-01
## Acinetobacter_79                                       3.407175e-02
## Pseudarthrobacter_80                                   2.514547e-04
## Sphingobium_81                                         8.272859e-03
## Limnohabitans_82                                       8.078204e-02
## Bacillus_83                                            3.773585e-01
## Sphingomonadaceae_84                                   4.978753e-01
## Corynebacterium_matruchotii_85                         6.894049e-02
## Pseudomonas_86                                         9.758778e-01
## Psychroglaciecola_87                                   1.457344e-02
## Acinetobacter_88                                       7.968958e-02
## Proteus_89                                             9.861426e-01
## Streptococcus_90                                       7.968958e-02
## Methylobacterium_Methylorubrum_91                      8.272859e-03
## Caulobacteraceae_92                                    6.739349e-01
## Escherichia/Shigella_93                                3.308276e-01
## Halomonas_94                                           6.606553e-02
## Nocardioides_95                                        1.659935e-01
## Bosea_96                                               2.701342e-03
## Micrococcus_97                                         1.476542e-01
## Methylobacillus_98                                     9.861426e-01
## Acinetobacter_100                                      8.835482e-01
## Phenylobacterium_mobile_101                            3.535453e-02
## Anoxybacillus_102                                      1.895021e-05
## Variovorax_paradoxus_103                               2.433194e-02
## Caulobacter_104                                        1.457344e-02
## Pseudomonas_105                                        9.586477e-01
## Tepidiphilus_succinatimandens_106                      9.301289e-01
## Haliangium_107                                         9.861426e-01
## Dietzia_109                                            8.078204e-02
## Reyranella_massiliensis_110                            9.758778e-01
## Massilia_111                                           7.383803e-02
## Methylopila_oligotropha_112                            6.894049e-02
## Haemophilus_114                                        7.968958e-02
## Stenotrophomonas_115                                   6.739349e-01
## Sphingomonas_koreensis_116                             9.758778e-01
## Asticcacaulis_excentricus_117                          9.758778e-01
## Neisseria_118                                          1.659935e-01
## Actinomyces_119                                        5.756639e-01
## Sphingobium_yanoikuyae_120                             9.301289e-01
## Ralstonia_121                                          5.417058e-01
## Sphingopyxis_122                                       9.301289e-01
## Yonghaparkia_123                                       8.272859e-03
## Brevundimonas_124                                      8.835482e-01
## Brevundimonas_126                                      9.921676e-01
## Anoxybacillus_127                                      8.078204e-02
## Tepidimonas_128                                        9.586477e-01
## Stenotrophomonas_129                                   1.659935e-01
## Providencia_130                                        8.835482e-01
## Blastomonas_131                                        9.301289e-01
## PMMR1_132                                              9.586477e-01
## Haemophilus_133                                        3.773585e-01
## Mesorhizobium_134                                      1.659935e-01
## Brevundimonas_135                                      8.078204e-02
## Sphingobium_137                                        7.968958e-02
## Vulcaniibacterium_139                                  9.586477e-01
## Klenkia_140                                            8.272859e-03
## Sphingomonas_141                                       1.659935e-01
## Lawsonella_clevelandensis_143                          8.084180e-01
## Ellin6055_144                                          3.773585e-01
## Pseudomonas_145                                        8.272859e-03
## Devosia_neptuniae_146                                  8.272859e-03
## Janibacter_147                                         2.433194e-02
## Devosia_148                                            9.301289e-01
## Brevundimonas_149                                      1.659935e-01
## Candidatus_Paracaedibacter_150                         8.835482e-01
## Paucibacter_151                                        8.084180e-01
## Meiothermus_152                                        8.272859e-03
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 5.417058e-01
## Pseudomonas_154                                        1.659935e-01
## Rhodopseudomonas_155                                   3.326027e-02
## Rhodopseudomonas_156                                   8.078204e-02
## Frankiales_158                                         1.659935e-01
## Novosphingobium_159                                    8.078204e-02
## Sphingosinicella_163                                   8.835482e-01
## Flavihumibacter_165                                    8.084180e-01
## Duganella_166                                          3.326027e-02
## Granulicatella_167                                     1.824895e-01
## Sphingoaurantiacus_polygranulatus_168                  8.272859e-03
## Caulobacter_169                                        8.272859e-03
## Finegoldia_171                                         1.824895e-01
## Acinetobacter_lwoffii_175                              7.968958e-02
## Methylopilaceae_176                                    2.701342e-03
## Halomonas_178                                          3.773585e-01
## Abiotrophia_defectiva_181                              6.894049e-02
## Caulobacteraceae_182                                   8.084180e-01
## Sphingomonas_184                                       8.084180e-01
## Herbiconiux_185                                        2.433194e-02
## Phreatobacter_oligotrophus_186                         8.835482e-01
## Alphaproteobacteria_187                                8.084180e-01
## Leifsonia_188                                          2.433194e-02
## Microvirga_189                                         6.894049e-02
## Porphyromonas_gingivalis_193                           2.433194e-02
## Bdellovibrio_194                                       9.586477e-01
## Streptococcus_195                                      3.773585e-01
## Enterobacterales_198                                   6.894049e-02
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199 8.078204e-02
## Brachybacterium_200                                    5.417058e-01
## Burkholderia_Caballeronia_Paraburkholderia_201         6.894049e-02
## Galbitalea_203                                         6.894049e-02
## Sphingobium_205                                        8.084180e-01
## Paracoccus_206                                         5.417058e-01
## Pyrinomonas_207                                        9.301289e-01
## Brevibacillus_208                                      8.272859e-03
## Luteimonas_209                                         2.433194e-02
## Bosea_211                                              8.084180e-01
## Micrococcaceae_212                                     3.773585e-01
## Gemella_213                                            1.824895e-01
## Massilia_214                                           6.894049e-02
## Streptococcus_216                                      3.773585e-01
## Patulibacter_minatonensis_217                          8.272859e-03
## Acidovorax_218                                         6.894049e-02
## Alloprevotella_219                                     1.824895e-01
## Novispirillum_220                                      8.835482e-01
## Rhodococcus_221                                        5.417058e-01
## Fimbriiglobus_223                                      6.894049e-02
## Gammaproteobacteria_226                                8.835482e-01
## Aquabacterium_228                                      6.894049e-02
## Acetobacteraceae_230                                   1.824895e-01
## Bosea_231                                              8.084180e-01
## Tepidiphilus_232                                       8.835482e-01
## Aerococcus_233                                         2.433194e-02
## Geodermatophilus_234                                   3.773585e-01
## Limnobacter_thiooxidans_236                            3.773585e-01
## Methylobacterium_Methylorubrum_240                     6.894049e-02
## Hansschlegelia_242                                     6.894049e-02
## Roseomonas_cervicalis_243                              8.835482e-01
## Legionella_lytica_244                                  8.835482e-01
## Klebsiella_245                                         1.824895e-01
## Methylobacterium_Methylorubrum_246                     6.894049e-02
## Prevotella_histicola_247                               6.894049e-02
## Prevotella_248                                         6.894049e-02
## Porphyromonas_254                                      6.894049e-02
## Belnapia_rosea_259                                     3.773585e-01
## Methylophilus_263                                      2.433194e-02
## Staphylococcus_264                                     3.773585e-01
## Methylobacterium_Methylorubrum_265                     8.084180e-01
## Turicella_otitidis_268                                 6.894049e-02
## Quadrisphaera_271                                      6.894049e-02
## Caulobacter_272                                        8.084180e-01
## Stenotrophomonas_277                                   3.773585e-01
## Frankiales_280                                         3.773585e-01
## Stenotrophomonas_282                                   5.417058e-01
## Phenylobacterium_286                                   6.894049e-02
## Devosia_288                                            2.433194e-02
## Pseudoxanthomonas_mexicana_289                         6.894049e-02
## Clostridium_sensu_stricto_1_293                        3.773585e-01
## Mesorhizobium_294                                      3.773585e-01
## KD4_96_297                                             6.894049e-02
## Kocuria_299                                            6.894049e-02
## Streptococcus_303                                      6.894049e-02
## Novosphingobium_311                                    8.084180e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314 6.894049e-02
## Vulcaniibacterium_thermophilum_321                     8.084180e-01
## Kocuria_330                                            6.894049e-02
## DSSD61_338                                             3.773585e-01
## Dietzia_timorensis_339                                 3.773585e-01
## Ruminiclostridium_341                                  3.773585e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 3.773585e-01
## Paenarthrobacter_344                                   3.773585e-01
## Candidatus_Paracaedibacter_347                         2.433194e-02
## Veillonella_348                                        6.894049e-02
## Cnuella_349                                            2.433194e-02
## UCG_005_354                                            6.894049e-02
## Cellulomonas_360                                       3.773585e-01
## Acetitomaculum_362                                     2.433194e-02
## Thermomonas_hydrothermalis_363                         6.894049e-02
## Ensifer_365                                            6.894049e-02
## Sphingomonas_367                                       6.894049e-02
## Burkholderia_Caballeronia_Paraburkholderia_374         6.894049e-02
## Pedobacter_381                                         2.433194e-02
## Hydrocarboniphaga_389                                  5.417058e-01
## Pseudoxanthomonas_447                                  6.894049e-02
##                                                        not.contaminant
## Tepidimonas_1                                                     TRUE
## Curvibacter_2                                                    FALSE
## Thermus_3                                                         TRUE
## Schlegelella_4                                                   FALSE
## Thermus_5                                                         TRUE
## Caulobacter_6                                                    FALSE
## Comamonadaceae_7                                                 FALSE
## Sphingomonas_8                                                    TRUE
## Bosea_9                                                          FALSE
## Thermus_thermophilus_10                                           TRUE
## Sphingobium_11                                                   FALSE
## Pseudomonas_12                                                    TRUE
## Methylobacterium_Methylorubrum_13                                 TRUE
## Ottowia_14                                                       FALSE
## Azospirillum_15                                                  FALSE
## Meiothermus_silvanus_16                                          FALSE
## Staphylococcus_17                                                FALSE
## Nitriliruptoraceae_18                                             TRUE
## Paucibacter_19                                                    TRUE
## Brevundimonas_20                                                 FALSE
## Delftia_21                                                        TRUE
## Methylobacterium_Methylorubrum_22                                 TRUE
## Methyloversatilis_23                                             FALSE
## Bradyrhizobium_24                                                 TRUE
## Comamonas_25                                                     FALSE
## Methylobacterium_Methylorubrum_26                                 TRUE
## Noviherbaspirillum_suwonense_27                                   TRUE
## Brevundimonas_28                                                 FALSE
## Xanthobacter_autotrophicus_29                                    FALSE
## Dolosigranulum_pigrum_30                                         FALSE
## Lactococcus_31                                                    TRUE
## Methylobacterium_Methylorubrum_32                                 TRUE
## Pseudomonas_33                                                    TRUE
## Streptococcus_34                                                  TRUE
## Corynebacterium_35                                                TRUE
## Bosea_36                                                          TRUE
## Moraxella_37                                                     FALSE
## Bacteriovorax_stolpii_38                                         FALSE
## Bosea_vestrisii_39                                               FALSE
## Phenylobacterium_muchangponense_40                               FALSE
## Rhodopseudomonas_41                                               TRUE
## Sphingomonas_koreensis_42                                        FALSE
## Achromobacter_43                                                 FALSE
## Corynebacterium_44                                               FALSE
## Pseudomonas_japonica_45                                           TRUE
## Aquabacterium_parvum_46                                          FALSE
## Aquabacterium_47                                                 FALSE
## Sphingopyxis_48                                                  FALSE
## Thiobacillus_thioparus_49                                        FALSE
## Thermus_brockianus_50                                             TRUE
## Staphylococcus_51                                                FALSE
## Aquabacterium_52                                                 FALSE
## Brevundimonas_53                                                 FALSE
## Haemophilus_54                                                    TRUE
## Burkholderia_Caballeronia_Paraburkholderia_55                     TRUE
## Cloacibacterium_56                                                TRUE
## Blastococcus_57                                                   TRUE
## Meiothermus_58                                                   FALSE
## Corynebacterium_59                                                TRUE
## Alcaligenes_60                                                   FALSE
## Methylobacterium_Methylorubrum_61                                 TRUE
## Corynebacterium_62                                                TRUE
## Neisseria_63                                                      TRUE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64             TRUE
## Brevundimonas_kwangchunensis_65                                   TRUE
## Ralstonia_66                                                      TRUE
## Cupriavidus_gilardii_67                                          FALSE
## Streptococcus_69                                                 FALSE
## Enhydrobacter_70                                                  TRUE
## Microbacteriaceae_71                                              TRUE
## Afipia_72                                                         TRUE
## Bosea_73                                                         FALSE
## Brevundimonas_74                                                  TRUE
## Brachymonas_75                                                   FALSE
## Fluviicola_76                                                    FALSE
## Skermanella_aerolata_77                                           TRUE
## Cupriavidus_78                                                   FALSE
## Acinetobacter_79                                                  TRUE
## Pseudarthrobacter_80                                              TRUE
## Sphingobium_81                                                    TRUE
## Limnohabitans_82                                                  TRUE
## Bacillus_83                                                       TRUE
## Sphingomonadaceae_84                                              TRUE
## Corynebacterium_matruchotii_85                                    TRUE
## Pseudomonas_86                                                   FALSE
## Psychroglaciecola_87                                              TRUE
## Acinetobacter_88                                                  TRUE
## Proteus_89                                                       FALSE
## Streptococcus_90                                                  TRUE
## Methylobacterium_Methylorubrum_91                                 TRUE
## Caulobacteraceae_92                                              FALSE
## Escherichia/Shigella_93                                           TRUE
## Halomonas_94                                                      TRUE
## Nocardioides_95                                                   TRUE
## Bosea_96                                                          TRUE
## Micrococcus_97                                                    TRUE
## Methylobacillus_98                                               FALSE
## Acinetobacter_100                                                FALSE
## Phenylobacterium_mobile_101                                       TRUE
## Anoxybacillus_102                                                 TRUE
## Variovorax_paradoxus_103                                          TRUE
## Caulobacter_104                                                   TRUE
## Pseudomonas_105                                                  FALSE
## Tepidiphilus_succinatimandens_106                                FALSE
## Haliangium_107                                                   FALSE
## Dietzia_109                                                       TRUE
## Reyranella_massiliensis_110                                      FALSE
## Massilia_111                                                      TRUE
## Methylopila_oligotropha_112                                       TRUE
## Haemophilus_114                                                   TRUE
## Stenotrophomonas_115                                             FALSE
## Sphingomonas_koreensis_116                                       FALSE
## Asticcacaulis_excentricus_117                                    FALSE
## Neisseria_118                                                     TRUE
## Actinomyces_119                                                  FALSE
## Sphingobium_yanoikuyae_120                                       FALSE
## Ralstonia_121                                                    FALSE
## Sphingopyxis_122                                                 FALSE
## Yonghaparkia_123                                                  TRUE
## Brevundimonas_124                                                FALSE
## Brevundimonas_126                                                FALSE
## Anoxybacillus_127                                                 TRUE
## Tepidimonas_128                                                  FALSE
## Stenotrophomonas_129                                              TRUE
## Providencia_130                                                  FALSE
## Blastomonas_131                                                  FALSE
## PMMR1_132                                                        FALSE
## Haemophilus_133                                                   TRUE
## Mesorhizobium_134                                                 TRUE
## Brevundimonas_135                                                 TRUE
## Sphingobium_137                                                   TRUE
## Vulcaniibacterium_139                                            FALSE
## Klenkia_140                                                       TRUE
## Sphingomonas_141                                                  TRUE
## Lawsonella_clevelandensis_143                                    FALSE
## Ellin6055_144                                                     TRUE
## Pseudomonas_145                                                   TRUE
## Devosia_neptuniae_146                                             TRUE
## Janibacter_147                                                    TRUE
## Devosia_148                                                      FALSE
## Brevundimonas_149                                                 TRUE
## Candidatus_Paracaedibacter_150                                   FALSE
## Paucibacter_151                                                  FALSE
## Meiothermus_152                                                   TRUE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153           FALSE
## Pseudomonas_154                                                   TRUE
## Rhodopseudomonas_155                                              TRUE
## Rhodopseudomonas_156                                              TRUE
## Frankiales_158                                                    TRUE
## Novosphingobium_159                                               TRUE
## Sphingosinicella_163                                             FALSE
## Flavihumibacter_165                                              FALSE
## Duganella_166                                                     TRUE
## Granulicatella_167                                                TRUE
## Sphingoaurantiacus_polygranulatus_168                             TRUE
## Caulobacter_169                                                   TRUE
## Finegoldia_171                                                    TRUE
## Acinetobacter_lwoffii_175                                         TRUE
## Methylopilaceae_176                                               TRUE
## Halomonas_178                                                     TRUE
## Abiotrophia_defectiva_181                                         TRUE
## Caulobacteraceae_182                                             FALSE
## Sphingomonas_184                                                 FALSE
## Herbiconiux_185                                                   TRUE
## Phreatobacter_oligotrophus_186                                   FALSE
## Alphaproteobacteria_187                                          FALSE
## Leifsonia_188                                                     TRUE
## Microvirga_189                                                    TRUE
## Porphyromonas_gingivalis_193                                      TRUE
## Bdellovibrio_194                                                 FALSE
## Streptococcus_195                                                 TRUE
## Enterobacterales_198                                              TRUE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199            TRUE
## Brachybacterium_200                                              FALSE
## Burkholderia_Caballeronia_Paraburkholderia_201                    TRUE
## Galbitalea_203                                                    TRUE
## Sphingobium_205                                                  FALSE
## Paracoccus_206                                                   FALSE
## Pyrinomonas_207                                                  FALSE
## Brevibacillus_208                                                 TRUE
## Luteimonas_209                                                    TRUE
## Bosea_211                                                        FALSE
## Micrococcaceae_212                                                TRUE
## Gemella_213                                                       TRUE
## Massilia_214                                                      TRUE
## Streptococcus_216                                                 TRUE
## Patulibacter_minatonensis_217                                     TRUE
## Acidovorax_218                                                    TRUE
## Alloprevotella_219                                                TRUE
## Novispirillum_220                                                FALSE
## Rhodococcus_221                                                  FALSE
## Fimbriiglobus_223                                                 TRUE
## Gammaproteobacteria_226                                          FALSE
## Aquabacterium_228                                                 TRUE
## Acetobacteraceae_230                                              TRUE
## Bosea_231                                                        FALSE
## Tepidiphilus_232                                                 FALSE
## Aerococcus_233                                                    TRUE
## Geodermatophilus_234                                              TRUE
## Limnobacter_thiooxidans_236                                       TRUE
## Methylobacterium_Methylorubrum_240                                TRUE
## Hansschlegelia_242                                                TRUE
## Roseomonas_cervicalis_243                                        FALSE
## Legionella_lytica_244                                            FALSE
## Klebsiella_245                                                    TRUE
## Methylobacterium_Methylorubrum_246                                TRUE
## Prevotella_histicola_247                                          TRUE
## Prevotella_248                                                    TRUE
## Porphyromonas_254                                                 TRUE
## Belnapia_rosea_259                                                TRUE
## Methylophilus_263                                                 TRUE
## Staphylococcus_264                                                TRUE
## Methylobacterium_Methylorubrum_265                               FALSE
## Turicella_otitidis_268                                            TRUE
## Quadrisphaera_271                                                 TRUE
## Caulobacter_272                                                  FALSE
## Stenotrophomonas_277                                              TRUE
## Frankiales_280                                                    TRUE
## Stenotrophomonas_282                                             FALSE
## Phenylobacterium_286                                              TRUE
## Devosia_288                                                       TRUE
## Pseudoxanthomonas_mexicana_289                                    TRUE
## Clostridium_sensu_stricto_1_293                                   TRUE
## Mesorhizobium_294                                                 TRUE
## KD4_96_297                                                        TRUE
## Kocuria_299                                                       TRUE
## Streptococcus_303                                                 TRUE
## Novosphingobium_311                                              FALSE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314            TRUE
## Vulcaniibacterium_thermophilum_321                               FALSE
## Kocuria_330                                                       TRUE
## DSSD61_338                                                        TRUE
## Dietzia_timorensis_339                                            TRUE
## Ruminiclostridium_341                                             TRUE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343            TRUE
## Paenarthrobacter_344                                              TRUE
## Candidatus_Paracaedibacter_347                                    TRUE
## Veillonella_348                                                   TRUE
## Cnuella_349                                                       TRUE
## UCG_005_354                                                       TRUE
## Cellulomonas_360                                                  TRUE
## Acetitomaculum_362                                                TRUE
## Thermomonas_hydrothermalis_363                                    TRUE
## Ensifer_365                                                       TRUE
## Sphingomonas_367                                                  TRUE
## Burkholderia_Caballeronia_Paraburkholderia_374                    TRUE
## Pedobacter_381                                                    TRUE
## Hydrocarboniphaga_389                                            FALSE
## Pseudoxanthomonas_447                                             TRUE

6.5.1 Inspect the number of times these taxa were observed in positive and negative samples

# Make phyloseq object of presence-absence in negative controls and true samples
ps.pa <- transform_sample_counts(ps_filtered, function(abund) 1*(abund>0))
ps.pa.neg <- prune_samples(sample_data(ps.pa)$Sample_type == "blank", ps.pa)
ps.pa.pos <- prune_samples(sample_data(ps.pa)$is.neg == "FALSE", ps.pa)
# Make data.frame of prevalence in positive and negative samples
df.pa <- data.frame(pa.pos=taxa_sums(ps.pa.pos), pa.neg=taxa_sums(ps.pa.neg),
                      contaminant=notcontamdf$not.contaminant)
ggplot(data=df.pa, aes(x=pa.neg, y=pa.pos, color=contaminant)) + geom_point() +
  xlab("Prevalence (Negative Controls)") + ylab("Prevalence (STGG Samples)")

6.5.2 Decontam MiSeq RunNo.514

sample_data(ps_filtered514)$is.neg <- sample_data(ps_filtered514)$Sample_type == "blank"
ps_filtered514 = prune_taxa(taxa_sums(ps_filtered514)>0.1, ps_filtered514)

#Identify true (STGG)
notcontamdf_514 <- isNotContaminant(ps_filtered514, neg ="is.neg", threshold = 0.1, detailed=TRUE)
table(notcontamdf_514$not.contaminant)
## 
## FALSE  TRUE 
##   147    38
head(which(notcontamdf_514$not.contaminant))
## [1] 2 3 5 6 8 9
select(notcontamdf_514, not.contaminant)
##                                                        not.contaminant
## Tepidimonas_1                                                    FALSE
## Thermus_3                                                         TRUE
## Thermus_5                                                         TRUE
## Caulobacter_6                                                    FALSE
## Sphingomonas_8                                                    TRUE
## Thermus_thermophilus_10                                           TRUE
## Sphingobium_11                                                   FALSE
## Pseudomonas_12                                                    TRUE
## Methylobacterium_Methylorubrum_13                                 TRUE
## Staphylococcus_17                                                FALSE
## Nitriliruptoraceae_18                                            FALSE
## Paucibacter_19                                                   FALSE
## Delftia_21                                                        TRUE
## Methylobacterium_Methylorubrum_22                                 TRUE
## Bradyrhizobium_24                                                 TRUE
## Methylobacterium_Methylorubrum_26                                 TRUE
## Noviherbaspirillum_suwonense_27                                  FALSE
## Xanthobacter_autotrophicus_29                                    FALSE
## Dolosigranulum_pigrum_30                                         FALSE
## Lactococcus_31                                                    TRUE
## Methylobacterium_Methylorubrum_32                                FALSE
## Pseudomonas_33                                                    TRUE
## Streptococcus_34                                                  TRUE
## Corynebacterium_35                                                TRUE
## Bosea_36                                                         FALSE
## Moraxella_37                                                     FALSE
## Rhodopseudomonas_41                                              FALSE
## Sphingomonas_koreensis_42                                        FALSE
## Corynebacterium_44                                               FALSE
## Pseudomonas_japonica_45                                           TRUE
## Aquabacterium_parvum_46                                          FALSE
## Thermus_brockianus_50                                             TRUE
## Staphylococcus_51                                                FALSE
## Haemophilus_54                                                   FALSE
## Burkholderia_Caballeronia_Paraburkholderia_55                    FALSE
## Cloacibacterium_56                                               FALSE
## Blastococcus_57                                                   TRUE
## Meiothermus_58                                                   FALSE
## Corynebacterium_59                                               FALSE
## Methylobacterium_Methylorubrum_61                                FALSE
## Corynebacterium_62                                               FALSE
## Neisseria_63                                                      TRUE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64            FALSE
## Brevundimonas_kwangchunensis_65                                   TRUE
## Ralstonia_66                                                     FALSE
## Streptococcus_69                                                 FALSE
## Enhydrobacter_70                                                  TRUE
## Microbacteriaceae_71                                             FALSE
## Afipia_72                                                        FALSE
## Brevundimonas_74                                                 FALSE
## Skermanella_aerolata_77                                           TRUE
## Acinetobacter_79                                                  TRUE
## Pseudarthrobacter_80                                              TRUE
## Sphingobium_81                                                    TRUE
## Limnohabitans_82                                                 FALSE
## Bacillus_83                                                      FALSE
## Sphingomonadaceae_84                                             FALSE
## Corynebacterium_matruchotii_85                                   FALSE
## Psychroglaciecola_87                                             FALSE
## Acinetobacter_88                                                  TRUE
## Streptococcus_90                                                 FALSE
## Methylobacterium_Methylorubrum_91                                 TRUE
## Caulobacteraceae_92                                              FALSE
## Escherichia/Shigella_93                                          FALSE
## Halomonas_94                                                     FALSE
## Nocardioides_95                                                  FALSE
## Bosea_96                                                          TRUE
## Micrococcus_97                                                   FALSE
## Phenylobacterium_mobile_101                                      FALSE
## Anoxybacillus_102                                                 TRUE
## Variovorax_paradoxus_103                                         FALSE
## Caulobacter_104                                                  FALSE
## Dietzia_109                                                      FALSE
## Massilia_111                                                     FALSE
## Methylopila_oligotropha_112                                      FALSE
## Haemophilus_114                                                  FALSE
## Stenotrophomonas_115                                             FALSE
## Neisseria_118                                                    FALSE
## Actinomyces_119                                                  FALSE
## Ralstonia_121                                                    FALSE
## Yonghaparkia_123                                                  TRUE
## Anoxybacillus_127                                                FALSE
## Stenotrophomonas_129                                             FALSE
## Haemophilus_133                                                  FALSE
## Mesorhizobium_134                                                FALSE
## Brevundimonas_135                                                FALSE
## Sphingobium_137                                                  FALSE
## Klenkia_140                                                       TRUE
## Sphingomonas_141                                                 FALSE
## Lawsonella_clevelandensis_143                                    FALSE
## Ellin6055_144                                                    FALSE
## Pseudomonas_145                                                   TRUE
## Devosia_neptuniae_146                                             TRUE
## Janibacter_147                                                   FALSE
## Brevundimonas_149                                                FALSE
## Paucibacter_151                                                  FALSE
## Meiothermus_152                                                   TRUE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153           FALSE
## Pseudomonas_154                                                  FALSE
## Rhodopseudomonas_155                                             FALSE
## Rhodopseudomonas_156                                             FALSE
## Frankiales_158                                                   FALSE
## Novosphingobium_159                                              FALSE
## Duganella_166                                                    FALSE
## Granulicatella_167                                               FALSE
## Sphingoaurantiacus_polygranulatus_168                             TRUE
## Caulobacter_169                                                   TRUE
## Finegoldia_171                                                   FALSE
## Acinetobacter_lwoffii_175                                        FALSE
## Methylopilaceae_176                                               TRUE
## Halomonas_178                                                    FALSE
## Abiotrophia_defectiva_181                                        FALSE
## Sphingomonas_184                                                 FALSE
## Herbiconiux_185                                                  FALSE
## Leifsonia_188                                                    FALSE
## Microvirga_189                                                   FALSE
## Porphyromonas_gingivalis_193                                     FALSE
## Streptococcus_195                                                FALSE
## Enterobacterales_198                                             FALSE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199           FALSE
## Brachybacterium_200                                              FALSE
## Burkholderia_Caballeronia_Paraburkholderia_201                   FALSE
## Galbitalea_203                                                   FALSE
## Sphingobium_205                                                  FALSE
## Paracoccus_206                                                   FALSE
## Brevibacillus_208                                                 TRUE
## Luteimonas_209                                                   FALSE
## Micrococcaceae_212                                               FALSE
## Gemella_213                                                      FALSE
## Massilia_214                                                     FALSE
## Streptococcus_216                                                FALSE
## Patulibacter_minatonensis_217                                     TRUE
## Acidovorax_218                                                   FALSE
## Alloprevotella_219                                               FALSE
## Rhodococcus_221                                                  FALSE
## Fimbriiglobus_223                                                FALSE
## Aquabacterium_228                                                FALSE
## Acetobacteraceae_230                                             FALSE
## Aerococcus_233                                                   FALSE
## Geodermatophilus_234                                             FALSE
## Limnobacter_thiooxidans_236                                      FALSE
## Methylobacterium_Methylorubrum_240                               FALSE
## Hansschlegelia_242                                               FALSE
## Klebsiella_245                                                   FALSE
## Methylobacterium_Methylorubrum_246                               FALSE
## Prevotella_histicola_247                                         FALSE
## Prevotella_248                                                   FALSE
## Porphyromonas_254                                                FALSE
## Belnapia_rosea_259                                               FALSE
## Methylophilus_263                                                FALSE
## Staphylococcus_264                                               FALSE
## Turicella_otitidis_268                                           FALSE
## Quadrisphaera_271                                                FALSE
## Stenotrophomonas_277                                             FALSE
## Frankiales_280                                                   FALSE
## Stenotrophomonas_282                                             FALSE
## Phenylobacterium_286                                             FALSE
## Devosia_288                                                      FALSE
## Pseudoxanthomonas_mexicana_289                                   FALSE
## Clostridium_sensu_stricto_1_293                                  FALSE
## Mesorhizobium_294                                                FALSE
## KD4_96_297                                                       FALSE
## Kocuria_299                                                      FALSE
## Streptococcus_303                                                FALSE
## Novosphingobium_311                                              FALSE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314           FALSE
## Kocuria_330                                                      FALSE
## DSSD61_338                                                       FALSE
## Dietzia_timorensis_339                                           FALSE
## Ruminiclostridium_341                                            FALSE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343           FALSE
## Paenarthrobacter_344                                             FALSE
## Candidatus_Paracaedibacter_347                                   FALSE
## Veillonella_348                                                  FALSE
## Cnuella_349                                                      FALSE
## UCG_005_354                                                      FALSE
## Cellulomonas_360                                                 FALSE
## Acetitomaculum_362                                               FALSE
## Thermomonas_hydrothermalis_363                                   FALSE
## Ensifer_365                                                      FALSE
## Sphingomonas_367                                                 FALSE
## Burkholderia_Caballeronia_Paraburkholderia_374                   FALSE
## Pedobacter_381                                                   FALSE
## Hydrocarboniphaga_389                                            FALSE
## Pseudoxanthomonas_447                                            FALSE
notcontamdf_514_T <- notcontamdf_514 %>%
  select(not.contaminant) %>%
  filter(not.contaminant==FALSE)

library(data.table)

notcontamdf_514_T <- setDT(notcontamdf_514_T, keep.rownames = TRUE)[]
notcontamdf_514_T10 <- slice_head(notcontamdf_514_T, n=10)
# Make phyloseq object of presence-absence in negative controls and true samples
ps.pa514 <- transform_sample_counts(ps_filtered514, function(abund) 1*(abund>0))
ps.pa.neg514 <- prune_samples(sample_data(ps.pa514)$Sample_type == "blank", ps.pa514)
ps.pa.pos514 <- prune_samples(sample_data(ps.pa514)$is.neg == "FALSE", ps.pa514)

# Make data.frame of prevalence in positive and negative samples
df.pa514 <- data.frame(pa.pos514=taxa_sums(ps.pa.pos514), pa.neg514=taxa_sums(ps.pa.neg514),
                      NotContaminant514=notcontamdf_514$not.contaminant)
ggplot(data=df.pa514, aes(x=pa.neg514, y=pa.pos514, color=NotContaminant514)) + 
  geom_point() +
  xlab("Prevalence (Negative Controls)") + ylab("Prevalence (STGG Samples)")

### Use Boxplot to compare relative abundace of ASVs indicated by isNotContam

OTU8<- as(otu_table(ps_filtered514), "matrix")
OTU8 <- OTU8[rowSums(t(t(OTU8)/colSums(OTU8))>=0.001)>1, ]
otu_table_ord8<-OTU8[order(-rowSums(OTU8)), ]
otu_table_ord_RA8 <- t(t(otu_table_ord8)/colSums(otu_table_ord8))
otu_table_ord_RA8 <- t(otu_table_ord_RA8)

vector1 <-c(notcontamdf_514_T$rn) # create a vector something line that 
otutable.contam <- otu_table_ord_RA8[,colnames(otu_table_ord_RA8)%in%vector1] # to subset for only otus of interest if ASVs are columns
otutable.contam.t <- t(otutable.contam)
boxplot.dfT_NC514 <- cbind(data.frame(Sample.ID=rownames(metadata514)), t(otutable.contam.t[1:10,]) %>%
                     data.frame(check.names = F) %>%
                       mutate(Residuals = 1 - rowSums(.))) %>%
                       gather(key=ASV, value=RA, -Sample.ID) %>%
                       mutate(ASV = factor(ASV, levels = rev(unique(ASV))))
## Warning: attributes are not identical across measure variables;
## they will be dropped
Sample_group6<-metadata514%>%
  select(Sample, Sample_type) %>% 
  deframe()

boxplot.dfT_NC514$Sample_group6<-Sample_group6[match(boxplot.dfT_NC514$Sample.ID, names(Sample_group6))]

boxplot.dfT_NC514 <- boxplot.dfT_NC514 %>%
  mutate(RA_percentage=RA*100)%>%
  mutate(log10_RA=log10(RA_percentage))
  

ggplot(data = boxplot.dfT_NC514, aes(x=ASV, y=log10_RA, fill=Sample_group6))+
  geom_boxplot()+
  ylab("Log10(Relative abundance)")+
  xlab("Sample")+
  theme_bw() +
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom") +
  ggsave("Relative_abundances_Boxplot_Notcontam514.tiff", units="in", width=8, height=10, dpi=300, compression = 'lzw')
## Warning: Removed 156 rows containing non-finite values (stat_boxplot).
## Warning: Removed 156 rows containing non-finite values (stat_boxplot).

## Decontam RNA Protect as blanks

ps_NoBlank <- subset_samples(ps_filtered, sample_data(ps_filtered)$Sample_type !="blank")
sample_data(ps_NoBlank)$is.neg <- sample_data(ps_NoBlank)$Sample_type == "rna_protect"

#Identify true (STGG)
notcontamdfNoBlank <- isNotContaminant(ps_NoBlank, neg ="is.neg", threshold = 0.5, detailed = TRUE)
table(notcontamdfNoBlank$not.contaminant)
## 
## FALSE  TRUE 
##   124   125
head(which(notcontamdfNoBlank$not.contaminant))
## [1]  1  5  8 10 12 13
select(notcontamdfNoBlank, not.contaminant)
##                                                        not.contaminant
## Tepidimonas_1                                                     TRUE
## Curvibacter_2                                                    FALSE
## Thermus_3                                                        FALSE
## Schlegelella_4                                                   FALSE
## Thermus_5                                                         TRUE
## Caulobacter_6                                                    FALSE
## Comamonadaceae_7                                                 FALSE
## Sphingomonas_8                                                    TRUE
## Bosea_9                                                          FALSE
## Thermus_thermophilus_10                                           TRUE
## Sphingobium_11                                                   FALSE
## Pseudomonas_12                                                    TRUE
## Methylobacterium_Methylorubrum_13                                 TRUE
## Ottowia_14                                                       FALSE
## Azospirillum_15                                                  FALSE
## Meiothermus_silvanus_16                                          FALSE
## Staphylococcus_17                                                FALSE
## Nitriliruptoraceae_18                                             TRUE
## Paucibacter_19                                                   FALSE
## Brevundimonas_20                                                 FALSE
## Delftia_21                                                        TRUE
## Methylobacterium_Methylorubrum_22                                 TRUE
## Methyloversatilis_23                                             FALSE
## Bradyrhizobium_24                                                 TRUE
## Comamonas_25                                                     FALSE
## Methylobacterium_Methylorubrum_26                                 TRUE
## Noviherbaspirillum_suwonense_27                                   TRUE
## Brevundimonas_28                                                 FALSE
## Xanthobacter_autotrophicus_29                                    FALSE
## Dolosigranulum_pigrum_30                                         FALSE
## Lactococcus_31                                                    TRUE
## Methylobacterium_Methylorubrum_32                                 TRUE
## Pseudomonas_33                                                    TRUE
## Streptococcus_34                                                  TRUE
## Corynebacterium_35                                               FALSE
## Bosea_36                                                          TRUE
## Moraxella_37                                                     FALSE
## Bacteriovorax_stolpii_38                                         FALSE
## Bosea_vestrisii_39                                               FALSE
## Phenylobacterium_muchangponense_40                               FALSE
## Rhodopseudomonas_41                                               TRUE
## Sphingomonas_koreensis_42                                        FALSE
## Achromobacter_43                                                 FALSE
## Corynebacterium_44                                                TRUE
## Pseudomonas_japonica_45                                           TRUE
## Aquabacterium_parvum_46                                          FALSE
## Aquabacterium_47                                                 FALSE
## Sphingopyxis_48                                                  FALSE
## Thiobacillus_thioparus_49                                        FALSE
## Thermus_brockianus_50                                             TRUE
## Staphylococcus_51                                                FALSE
## Aquabacterium_52                                                 FALSE
## Brevundimonas_53                                                 FALSE
## Haemophilus_54                                                    TRUE
## Burkholderia_Caballeronia_Paraburkholderia_55                     TRUE
## Cloacibacterium_56                                               FALSE
## Blastococcus_57                                                   TRUE
## Meiothermus_58                                                   FALSE
## Corynebacterium_59                                               FALSE
## Alcaligenes_60                                                   FALSE
## Methylobacterium_Methylorubrum_61                                 TRUE
## Corynebacterium_62                                                TRUE
## Neisseria_63                                                      TRUE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64             TRUE
## Brevundimonas_kwangchunensis_65                                   TRUE
## Ralstonia_66                                                      TRUE
## Cupriavidus_gilardii_67                                          FALSE
## Streptococcus_69                                                 FALSE
## Enhydrobacter_70                                                  TRUE
## Microbacteriaceae_71                                             FALSE
## Afipia_72                                                         TRUE
## Bosea_73                                                         FALSE
## Brevundimonas_74                                                  TRUE
## Brachymonas_75                                                   FALSE
## Fluviicola_76                                                    FALSE
## Skermanella_aerolata_77                                           TRUE
## Cupriavidus_78                                                   FALSE
## Acinetobacter_79                                                  TRUE
## Pseudarthrobacter_80                                              TRUE
## Sphingobium_81                                                    TRUE
## Limnohabitans_82                                                  TRUE
## Bacillus_83                                                      FALSE
## Sphingomonadaceae_84                                             FALSE
## Corynebacterium_matruchotii_85                                    TRUE
## Pseudomonas_86                                                   FALSE
## Psychroglaciecola_87                                              TRUE
## Acinetobacter_88                                                  TRUE
## Proteus_89                                                       FALSE
## Streptococcus_90                                                  TRUE
## Methylobacterium_Methylorubrum_91                                 TRUE
## Caulobacteraceae_92                                              FALSE
## Escherichia/Shigella_93                                           TRUE
## Halomonas_94                                                      TRUE
## Nocardioides_95                                                   TRUE
## Bosea_96                                                          TRUE
## Micrococcus_97                                                    TRUE
## Methylobacillus_98                                               FALSE
## Acinetobacter_100                                                FALSE
## Phenylobacterium_mobile_101                                       TRUE
## Anoxybacillus_102                                                 TRUE
## Variovorax_paradoxus_103                                          TRUE
## Caulobacter_104                                                   TRUE
## Pseudomonas_105                                                  FALSE
## Tepidiphilus_succinatimandens_106                                FALSE
## Haliangium_107                                                   FALSE
## Dietzia_109                                                       TRUE
## Reyranella_massiliensis_110                                      FALSE
## Massilia_111                                                      TRUE
## Methylopila_oligotropha_112                                       TRUE
## Haemophilus_114                                                   TRUE
## Stenotrophomonas_115                                             FALSE
## Sphingomonas_koreensis_116                                       FALSE
## Asticcacaulis_excentricus_117                                    FALSE
## Neisseria_118                                                     TRUE
## Actinomyces_119                                                  FALSE
## Sphingobium_yanoikuyae_120                                       FALSE
## Ralstonia_121                                                    FALSE
## Sphingopyxis_122                                                 FALSE
## Yonghaparkia_123                                                  TRUE
## Brevundimonas_124                                                FALSE
## Brevundimonas_126                                                FALSE
## Anoxybacillus_127                                                 TRUE
## Tepidimonas_128                                                  FALSE
## Stenotrophomonas_129                                             FALSE
## Providencia_130                                                  FALSE
## Blastomonas_131                                                  FALSE
## PMMR1_132                                                        FALSE
## Haemophilus_133                                                  FALSE
## Mesorhizobium_134                                                FALSE
## Brevundimonas_135                                                 TRUE
## Sphingobium_137                                                   TRUE
## Vulcaniibacterium_139                                            FALSE
## Klenkia_140                                                       TRUE
## Sphingomonas_141                                                 FALSE
## Lawsonella_clevelandensis_143                                    FALSE
## Ellin6055_144                                                    FALSE
## Pseudomonas_145                                                   TRUE
## Devosia_neptuniae_146                                             TRUE
## Janibacter_147                                                    TRUE
## Devosia_148                                                      FALSE
## Brevundimonas_149                                                 TRUE
## Candidatus_Paracaedibacter_150                                   FALSE
## Paucibacter_151                                                  FALSE
## Meiothermus_152                                                   TRUE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153           FALSE
## Pseudomonas_154                                                   TRUE
## Rhodopseudomonas_155                                              TRUE
## Rhodopseudomonas_156                                              TRUE
## Frankiales_158                                                    TRUE
## Novosphingobium_159                                               TRUE
## Sphingosinicella_163                                             FALSE
## Flavihumibacter_165                                              FALSE
## Duganella_166                                                     TRUE
## Granulicatella_167                                               FALSE
## Sphingoaurantiacus_polygranulatus_168                             TRUE
## Caulobacter_169                                                   TRUE
## Finegoldia_171                                                    TRUE
## Acinetobacter_lwoffii_175                                         TRUE
## Methylopilaceae_176                                               TRUE
## Halomonas_178                                                    FALSE
## Abiotrophia_defectiva_181                                         TRUE
## Caulobacteraceae_182                                             FALSE
## Sphingomonas_184                                                 FALSE
## Herbiconiux_185                                                   TRUE
## Phreatobacter_oligotrophus_186                                   FALSE
## Alphaproteobacteria_187                                          FALSE
## Leifsonia_188                                                     TRUE
## Microvirga_189                                                    TRUE
## Porphyromonas_gingivalis_193                                      TRUE
## Bdellovibrio_194                                                 FALSE
## Streptococcus_195                                                FALSE
## Enterobacterales_198                                              TRUE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199            TRUE
## Brachybacterium_200                                              FALSE
## Burkholderia_Caballeronia_Paraburkholderia_201                    TRUE
## Galbitalea_203                                                    TRUE
## Sphingobium_205                                                  FALSE
## Paracoccus_206                                                   FALSE
## Pyrinomonas_207                                                  FALSE
## Brevibacillus_208                                                 TRUE
## Luteimonas_209                                                    TRUE
## Bosea_211                                                        FALSE
## Micrococcaceae_212                                               FALSE
## Gemella_213                                                      FALSE
## Massilia_214                                                      TRUE
## Streptococcus_216                                                FALSE
## Patulibacter_minatonensis_217                                     TRUE
## Acidovorax_218                                                    TRUE
## Alloprevotella_219                                                TRUE
## Novispirillum_220                                                FALSE
## Rhodococcus_221                                                  FALSE
## Fimbriiglobus_223                                                 TRUE
## Gammaproteobacteria_226                                          FALSE
## Aquabacterium_228                                                 TRUE
## Acetobacteraceae_230                                              TRUE
## Bosea_231                                                        FALSE
## Tepidiphilus_232                                                 FALSE
## Aerococcus_233                                                    TRUE
## Geodermatophilus_234                                             FALSE
## Limnobacter_thiooxidans_236                                      FALSE
## Methylobacterium_Methylorubrum_240                                TRUE
## Hansschlegelia_242                                                TRUE
## Roseomonas_cervicalis_243                                        FALSE
## Legionella_lytica_244                                            FALSE
## Klebsiella_245                                                   FALSE
## Methylobacterium_Methylorubrum_246                                TRUE
## Prevotella_histicola_247                                          TRUE
## Prevotella_248                                                    TRUE
## Porphyromonas_254                                                 TRUE
## Belnapia_rosea_259                                               FALSE
## Methylophilus_263                                                 TRUE
## Staphylococcus_264                                               FALSE
## Methylobacterium_Methylorubrum_265                               FALSE
## Turicella_otitidis_268                                            TRUE
## Quadrisphaera_271                                                 TRUE
## Caulobacter_272                                                  FALSE
## Stenotrophomonas_277                                             FALSE
## Frankiales_280                                                   FALSE
## Stenotrophomonas_282                                             FALSE
## Phenylobacterium_286                                              TRUE
## Devosia_288                                                       TRUE
## Pseudoxanthomonas_mexicana_289                                    TRUE
## Clostridium_sensu_stricto_1_293                                  FALSE
## Mesorhizobium_294                                                FALSE
## KD4_96_297                                                        TRUE
## Kocuria_299                                                       TRUE
## Streptococcus_303                                                 TRUE
## Novosphingobium_311                                              FALSE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314            TRUE
## Vulcaniibacterium_thermophilum_321                               FALSE
## Kocuria_330                                                       TRUE
## DSSD61_338                                                       FALSE
## Dietzia_timorensis_339                                           FALSE
## Ruminiclostridium_341                                            FALSE
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343           FALSE
## Paenarthrobacter_344                                             FALSE
## Candidatus_Paracaedibacter_347                                    TRUE
## Veillonella_348                                                   TRUE
## Cnuella_349                                                       TRUE
## UCG_005_354                                                       TRUE
## Cellulomonas_360                                                 FALSE
## Acetitomaculum_362                                                TRUE
## Thermomonas_hydrothermalis_363                                    TRUE
## Ensifer_365                                                       TRUE
## Sphingomonas_367                                                  TRUE
## Burkholderia_Caballeronia_Paraburkholderia_374                    TRUE
## Pedobacter_381                                                    TRUE
## Hydrocarboniphaga_389                                            FALSE
## Pseudoxanthomonas_447                                             TRUE
# Make phyloseq object of presence-absence in negative controls and true samples
ps.pa.NoBlanks <- transform_sample_counts(ps_NoBlank, function(abund) 1*(abund>0))
ps.pa.neg.NoBlanks <- prune_samples(sample_data(ps.pa.NoBlanks)$Sample_type == "rna_protect", ps.pa.NoBlanks)
ps.pa.pos.NoBlanks <- prune_samples(sample_data(ps.pa.NoBlanks)$is.neg == "FALSE", ps.pa.NoBlanks)

# Make data.frame of prevalence in positive and negative samples
df.pa.NoBlanks <- data.frame(pa.pos.NoBlanks=taxa_sums(ps.pa.pos.NoBlanks), pa.neg.NoBlanks=taxa_sums(ps.pa.neg.NoBlanks),
                      contaminant.NoBlanks=notcontamdfNoBlank$not.contaminant)
ggplot(data=df.pa.NoBlanks, aes(x=pa.neg.NoBlanks, y=pa.pos.NoBlanks, color=contaminant.NoBlanks)) + geom_point() +
  xlab("Prevalence (Negative Controls)") + ylab("Prevalence (True Samples)")

7 Metagenomeseq

7.1 Differential Abundance testing for all samples

# Check zero-inflated distribution of the first ASV in your dataset
dat <- data.frame(strep=otu_table(ps_filtered514)[1,])%>%t
hist(dat)

print(wilcox.test(dat))
## Warning in wilcox.test.default(dat): cannot compute exact p-value with ties
## 
##  Wilcoxon signed rank test with continuity correction
## 
## data:  dat
## V = 561, p-value = 5.639e-07
## alternative hypothesis: true location is not equal to 0

7.2 Updated with fitFeatureModel

# raw sequence count phyloseq
metaSeq <- phyloseq_to_metagenomeSeq(ps_filtered) 

# internal normalisation
metaSeq <- cumNorm(metaSeq, p=0.5) 

# formula
mod <- model.matrix(~ Sample_type+Run_No, pData(metaSeq)) 

# NOT fitZig; gives higher # false-positives
fit <-  fitFeatureModel(metaSeq, mod) 
## Error in fitFeatureModel(metaSeq, mod): Can't analyze currently.
VP.df <- MRcoefs(fit, number = Inf, alpha = 1, adjustMethod = "BH")
## Error in grep("fitFeatureModel", obj@call): object 'fit' not found

fitFeatureModel will not run with all 3 sample types. Is it possible to fix this? For when run with a phyloseq object contianing only two samples types, it will not let me correct for Miseq Run, how might I fix this?

7.2.1 STGG vs Blank

ps_SB <- subset_samples(ps_filtered, sample_data(ps_filtered)$Sample_type!="rna_protect")
ps_SB <- prune_taxa(taxa_sums(ps_SB)>0, ps_SB)


metaSeq_SB <- phyloseq_to_metagenomeSeq(ps_SB) # raw sequence count phyloseq
metaSeq_norm_SB <- cumNorm(metaSeq_SB, p=0.5) # internal normalisation
mod3_SB <- model.matrix(~ Sample_type, pData(metaSeq_norm_SB)) # formula
fit_SB <-  fitFeatureModel(metaSeq_norm_SB, mod3_SB) # NOT fitZig; gives higher # false-positives
## Warning: Partial NA coefficients for 142 probe(s)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
VP.df_SB <- MRcoefs(fit_SB, number = Inf, alpha = 1, adjustMethod = "BH") # extract all output (not only significant)
VP.df_SB
##                                                               logFC         se
## Curvibacter_2                                          -3.963920483 0.54024188
## Thermus_thermophilus_10                                 3.552298875 0.70664167
## Sphingobium_11                                         -3.424260724 0.68324742
## Schlegelella_4                                         -3.241970855 0.44356943
## Tepidimonas_1                                           2.911508392 0.33334908
## Caulobacter_6                                          -2.838307400 0.39009662
## Comamonadaceae_7                                       -2.811768245 0.38415314
## Bosea_9                                                -2.677007920 0.37494684
## Lactococcus_31                                          2.595015822 0.24423757
## Thermus_5                                               2.443574805 0.37124598
## Meiothermus_silvanus_16                                -2.428599998 0.35355026
## Acinetobacter_79                                        2.368166286 1.01461078
## Azospirillum_15                                        -2.331226207 0.31962883
## Brevundimonas_20                                       -2.256837716 0.34467707
## Ottowia_14                                             -2.056958186 0.31960812
## Corynebacterium_35                                      2.031525174 1.04295366
## Methyloversatilis_23                                   -1.990723579 0.29957364
## Blastococcus_57                                         1.855546366 0.97286818
## Methylobacterium_Methylorubrum_26                       1.832230560 0.75895135
## Methylobacterium_Methylorubrum_22                       1.709138025 0.55980447
## Streptococcus_34                                        1.704724233 0.79762261
## Methylobacterium_Methylorubrum_13                       1.698238092 0.43251168
## Pseudomonas_japonica_45                                 1.668486465 0.70785140
## Thermus_3                                              -1.636336378 0.33784539
## Cloacibacterium_56                                      1.635541147 0.83302063
## Xanthobacter_autotrophicus_29                          -1.501782847 0.24157973
## Caulobacter_104                                         1.494881366 0.93098494
## Comamonas_25                                           -1.413191603 0.30189316
## Pseudomonas_33                                          1.402267854 0.54002826
## Bosea_36                                               -1.379869308 0.50074680
## Bacteriovorax_stolpii_38                               -1.354585647 0.25673482
## Phenylobacterium_muchangponense_40                     -1.290831223 0.25388296
## Brevundimonas_28                                       -1.277026780 0.26487590
## Achromobacter_43                                       -1.255918897 0.22431716
## Enhydrobacter_70                                        1.226268900 0.81295600
## Aquabacterium_parvum_46                                -1.161185588 0.28904262
## Corynebacterium_62                                      1.148695832 0.81361395
## Bosea_vestrisii_39                                     -1.147818216 0.24290929
## Ralstonia_66                                            1.138437160 0.90870319
## Frankiales_158                                          1.105763874 1.05104949
## Thiobacillus_thioparus_49                              -1.090671274 0.21386584
## Brevundimonas_kwangchunensis_65                         1.057245846 0.28958925
## Corynebacterium_44                                     -1.020774152 1.01626585
## Massilia_111                                            0.985823709 0.98785481
## Noviherbaspirillum_suwonense_27                         0.926612355 0.46608926
## Aquabacterium_52                                       -0.926061717 0.20180008
## Sphingomonas_koreensis_42                              -0.925171164 0.48803579
## Bradyrhizobium_24                                       0.925035181 0.47757219
## Neisseria_118                                           0.914763998 1.06663054
## Anoxybacillus_102                                       0.870518085 0.20941379
## Pseudarthrobacter_80                                    0.840088027 0.24241209
## Psychroglaciecola_87                                    0.794033897 0.93399428
## Thermus_brockianus_50                                   0.792449755 0.29877557
## Cupriavidus_gilardii_67                                -0.761755269 0.22494231
## Alcaligenes_60                                         -0.732521082 0.20214971
## Sphingopyxis_48                                        -0.732216989 0.22818616
## Rhodopseudomonas_41                                     0.720576901 0.78124336
## Haemophilus_114                                         0.718428433 0.97349974
## Nitriliruptoraceae_18                                   0.712251832 0.21533012
## Bosea_73                                               -0.702680948 0.22255246
## Methylobacterium_Methylorubrum_32                       0.702046287 0.79198550
## Phenylobacterium_mobile_101                             0.701745875 0.96932506
## Micrococcus_97                                          0.700658864 1.02329101
## Staphylococcus_17                                      -0.699978904 0.42735824
## Sphingomonadaceae_84                                   -0.687145652 0.81099567
## Fluviicola_76                                          -0.685869437 0.20114040
## Neisseria_63                                            0.676585111 0.26303411
## Halomonas_94                                            0.670294593 0.87279580
## Bosea_96                                                0.633664419 0.23359246
## Brevundimonas_53                                       -0.623822194 0.24837562
## Aquabacterium_47                                       -0.601037826 0.20861306
## Methylobacillus_98                                     -0.584241762 0.17422687
## Sphingobium_81                                          0.556358842 0.23812505
## Brevundimonas_149                                      -0.549232639 1.08725802
## Haliangium_107                                         -0.544385887 0.15916637
## Methylobacterium_Methylorubrum_91                       0.537761686 0.22934077
## Brachymonas_75                                         -0.529270586 0.21414760
## Methylopilaceae_176                                     0.519213558 0.18543056
## Skermanella_aerolata_77                                 0.515257019 0.23089355
## Meiothermus_58                                         -0.511884937 0.26523616
## Meiothermus_152                                         0.498360896 0.19867986
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64   0.491078027 0.76202464
## Streptococcus_69                                       -0.466092702 0.29454756
## Klenkia_140                                             0.459072019 0.19637345
## Limnohabitans_82                                        0.458669941 0.28419442
## Pseudomonas_145                                         0.446086871 0.19151791
## Brevundimonas_126                                      -0.425752213 0.16056151
## PMMR1_132                                              -0.422983646 0.19506689
## Variovorax_paradoxus_103                                0.418191171 0.21746017
## Cupriavidus_78                                         -0.414011411 0.21089969
## Proteus_89                                             -0.409127713 0.17813720
## Sphingoaurantiacus_polygranulatus_168                   0.407185648 0.17836730
## Yonghaparkia_123                                        0.404184353 0.18766425
## Caulobacter_169                                         0.396750701 0.17491073
## Tepidimonas_128                                        -0.395409252 0.15957817
## Acinetobacter_88                                        0.391927337 0.20498000
## Haemophilus_54                                          0.391008813 0.25968088
## Asticcacaulis_excentricus_117                          -0.388546328 0.14928009
## Tepidiphilus_succinatimandens_106                      -0.385662030 0.17261428
## Duganella_166                                           0.384434240 0.21990728
## Reyranella_massiliensis_110                            -0.381838606 0.14547951
## Sphingobium_yanoikuyae_120                             -0.371584869 0.16787301
## Acinetobacter_100                                      -0.360139807 0.16345310
## Acinetobacter_lwoffii_175                               0.357524508 0.19383129
## Stenotrophomonas_129                                    0.353858446 0.17835345
## Devosia_neptuniae_146                                   0.348560338 0.16532515
## Enterobacterales_198                                    0.342190601 0.18791464
## Sphingopyxis_122                                       -0.341739021 0.15151079
## Pseudomonas_86                                         -0.340678224 0.14682081
## Porphyromonas_gingivalis_193                            0.338995717 0.17287530
## Devosia_288                                             0.337951981 0.15723643
## Brevibacillus_208                                       0.336762461 0.15594845
## Leifsonia_188                                           0.336598815 0.17206004
## Escherichia/Shigella_93                                -0.330964297 0.78060795
## Pseudomonas_105                                        -0.329078955 0.15992852
## Actinomyces_119                                        -0.316059715 1.07016058
## Microvirga_189                                          0.315134664 0.18396903
## Sphingomonas_koreensis_116                             -0.312532184 0.15832369
## Delftia_21                                              0.306994634 0.53901147
## Providencia_130                                        -0.305328296 0.12898551
## Brevundimonas_74                                       -0.305052881 0.79466623
## Janibacter_147                                          0.294251473 0.16479329
## Phreatobacter_oligotrophus_186                         -0.294121317 0.14142600
## Patulibacter_minatonensis_217                           0.293922647 0.14279371
## Galbitalea_203                                          0.292557670 0.17447576
## Methylobacterium_Methylorubrum_240                      0.291362970 0.16907351
## Luteimonas_209                                          0.287593575 0.15663130
## Rhodopseudomonas_155                                    0.282440856 0.21383797
## Paucibacter_19                                         -0.281179594 0.24297623
## Devosia_148                                            -0.277501084 0.17084116
## Dolosigranulum_pigrum_30                               -0.274721356 0.67898716
## Anoxybacillus_127                                       0.274640210 0.22655783
## Herbiconiux_185                                         0.271823429 0.15316667
## Tepidiphilus_232                                       -0.268334872 0.14711061
## Acidovorax_218                                          0.267629907 0.16666676
## Pedobacter_381                                          0.256897376 0.12720407
## Turicella_otitidis_268                                  0.253970052 0.15299221
## Novosphingobium_159                                     0.247131758 0.21917341
## Methylopila_oligotropha_112                             0.246701340 0.17808762
## Legionella_lytica_244                                  -0.246312823 0.12932934
## Cnuella_349                                             0.245920444 0.12898330
## Aerococcus_233                                          0.245857698 0.14035048
## Massilia_214                                            0.244573375 0.16104351
## Nocardioides_95                                         0.244490540 1.11573925
## Sphingomonas_184                                       -0.241800476 0.18216838
## Methylophilus_263                                       0.241053997 0.13451726
## Paucibacter_151                                        -0.239552697 0.22741507
## Bdellovibrio_194                                       -0.239464020 0.14837756
## Afipia_72                                               0.239196103 0.77298698
## Streptococcus_303                                       0.237268049 0.14596694
## Caulobacteraceae_182                                   -0.236737612 0.13512250
## Methylobacterium_Methylorubrum_246                      0.236637681 0.15322072
## Prevotella_histicola_247                                0.236433090 0.15137060
## Burkholderia_Caballeronia_Paraburkholderia_201          0.230958600 0.15638759
## Acetitomaculum_362                                      0.230206767 0.12288702
## Candidatus_Paracaedibacter_347                          0.227320058 0.12325681
## Hansschlegelia_242                                      0.227220773 0.14853328
## Rhodopseudomonas_156                                    0.225903687 0.18700430
## Aquabacterium_228                                       0.222827118 0.15034607
## Sphingosinicella_163                                   -0.218314518 0.17353684
## Methylobacterium_Methylorubrum_61                       0.217374812 0.60075262
## Sphingobium_205                                        -0.216686673 0.13865897
## Corynebacterium_matruchotii_85                          0.215052784 0.17259189
## Bosea_211                                              -0.212278266 0.11380117
## Sphingomonas_367                                        0.211822824 0.13412553
## Blastomonas_131                                        -0.211024256 0.13244995
## Thermomonas_hydrothermalis_363                          0.210861478 0.13113563
## Mesorhizobium_134                                       0.207100945 0.19758504
## Prevotella_248                                          0.206603733 0.14057789
## Pseudoxanthomonas_mexicana_289                          0.203667405 0.13384922
## Burkholderia_Caballeronia_Paraburkholderia_374          0.200953498 0.12702186
## Ensifer_365                                             0.199620037 0.12778726
## Quadrisphaera_271                                       0.199498862 0.13647411
## Kocuria_299                                             0.198946912 0.13275762
## Bosea_231                                              -0.197138082 0.10720533
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199  0.196232907 0.19031143
## Caulobacter_272                                        -0.196093219 0.14171211
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314  0.195954813 0.12966231
## Abiotrophia_defectiva_181                               0.195459848 0.14454876
## Granulicatella_167                                      0.193407338 0.13733518
## Klebsiella_245                                          0.193162356 0.12451368
## Pyrinomonas_207                                        -0.192348109 0.10719518
## Sphingomonas_141                                        0.191559433 0.19112018
## Fimbriiglobus_223                                       0.191123005 0.14304231
## KD4_96_297                                              0.188489430 0.13033345
## Gemella_213                                             0.187364851 0.13871621
## Brevundimonas_124                                      -0.185225092 0.12195254
## Brevundimonas_135                                       0.184342138 0.21093018
## Novosphingobium_311                                    -0.182964476 0.16936096
## Roseomonas_cervicalis_243                              -0.182650078 0.12126265
## Kocuria_330                                             0.182120841 0.12579987
## Novispirillum_220                                      -0.180106930 0.11948014
## Veillonella_348                                         0.179239238 0.12563011
## Vulcaniibacterium_thermophilum_321                     -0.178796961 0.12933383
## Phenylobacterium_286                                    0.178705091 0.12781783
## Methylobacterium_Methylorubrum_265                     -0.176590912 0.11362628
## Dietzia_109                                             0.172830010 0.20302292
## Burkholderia_Caballeronia_Paraburkholderia_55           0.166877054 0.70303463
## UCG_005_354                                             0.164785632 0.11800280
## Stenotrophomonas_115                                   -0.162461763 0.15390972
## Vulcaniibacterium_139                                  -0.161916807 0.10803701
## Porphyromonas_254                                       0.157013407 0.12091507
## Microbacteriaceae_71                                    0.152522675 0.15931139
## Alloprevotella_219                                      0.148825655 0.13753308
## Flavihumibacter_165                                    -0.144906207 0.11479531
## Lawsonella_clevelandensis_143                          -0.141141860 0.18869082
## Pseudoxanthomonas_447                                   0.137459032 0.10264615
## Caulobacteraceae_92                                    -0.137383983 0.21157872
## Sphingobium_137                                         0.136830606 1.01632016
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 -0.132013942 0.23442312
## Alphaproteobacteria_187                                -0.130433734 0.10777130
## Bacillus_83                                             0.129136681 0.23721853
## Candidatus_Paracaedibacter_150                         -0.126986570 0.10379040
## Pseudomonas_12                                         -0.121512220 0.25066714
## Mesorhizobium_294                                       0.099852139 0.10267611
## Acetobacteraceae_230                                    0.097216459 0.16088468
## Moraxella_37                                           -0.095923676 0.87415630
## Staphylococcus_51                                      -0.087932701 0.29118450
## Streptococcus_216                                       0.083795559 0.10754634
## Sphingomonas_8                                         -0.073261151 0.49395781
## Haemophilus_133                                        -0.069558928 0.22019559
## Hydrocarboniphaga_389                                  -0.068674994 0.17672423
## Stenotrophomonas_282                                   -0.060029871 0.17647219
## Ellin6055_144                                          -0.059040401 0.15895183
## Finegoldia_171                                          0.058623633 0.20285771
## Staphylococcus_264                                      0.056759038 0.14144779
## Halomonas_178                                           0.056697053 0.15259399
## Corynebacterium_59                                      0.048309009 0.19486062
## Gammaproteobacteria_226                                -0.048250682 0.06685013
## Rhodococcus_221                                        -0.047119408 0.15050347
## Limnobacter_thiooxidans_236                             0.045523802 0.15773759
## Stenotrophomonas_277                                    0.044787650 0.12243119
## Belnapia_rosea_259                                      0.041120499 0.19136354
## Geodermatophilus_234                                    0.038544165 0.13636578
## Cellulomonas_360                                        0.036383980 0.14797078
## Brachybacterium_200                                     0.033769717 0.21296678
## Micrococcaceae_212                                      0.028228710 0.16265303
## Streptococcus_195                                       0.027343810 0.17727539
## Pseudomonas_154                                         0.023456657 1.05398521
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 -0.022614327 0.13495167
## DSSD61_338                                             -0.019848401 0.13904573
## Frankiales_280                                         -0.011570907 0.11657015
## Dietzia_timorensis_339                                  0.011112659 0.13640072
## Paenarthrobacter_344                                   -0.010638447 0.13925496
## Ruminiclostridium_341                                  -0.009571825 0.14426854
## Ralstonia_121                                          -0.007710715 0.19318124
## Paracoccus_206                                         -0.006791269 0.13245751
## Clostridium_sensu_stricto_1_293                         0.002416800 0.14566414
## Streptococcus_90                                        0.001623647 1.08764735
##                                                             pvalues
## Curvibacter_2                                          2.178258e-13
## Thermus_thermophilus_10                                4.981712e-07
## Sphingobium_11                                         5.393911e-07
## Schlegelella_4                                         2.695622e-13
## Tepidimonas_1                                          0.000000e+00
## Caulobacter_6                                          3.441691e-13
## Comamonadaceae_7                                       2.491340e-13
## Bosea_9                                                9.352519e-13
## Lactococcus_31                                         0.000000e+00
## Thermus_5                                              4.638778e-11
## Meiothermus_silvanus_16                                6.457279e-12
## Acinetobacter_79                                       1.959238e-02
## Azospirillum_15                                        3.019807e-13
## Brevundimonas_20                                       5.843481e-11
## Ottowia_14                                             1.227634e-10
## Corynebacterium_35                                     5.143201e-02
## Methyloversatilis_23                                   3.028267e-11
## Blastococcus_57                                        5.648243e-02
## Methylobacterium_Methylorubrum_26                      1.577150e-02
## Methylobacterium_Methylorubrum_22                      2.264918e-03
## Streptococcus_34                                       3.257712e-02
## Methylobacterium_Methylorubrum_13                      8.620664e-05
## Pseudomonas_japonica_45                                1.841759e-02
## Thermus_3                                              1.276055e-06
## Cloacibacterium_56                                     4.960132e-02
## Xanthobacter_autotrophicus_29                          5.083336e-10
## Caulobacter_104                                        1.083401e-01
## Comamonas_25                                           2.853419e-06
## Pseudomonas_33                                         9.413604e-03
## Bosea_36                                               5.858051e-03
## Bacteriovorax_stolpii_38                               1.318863e-07
## Phenylobacterium_muchangponense_40                     3.688766e-07
## Brevundimonas_28                                       1.426780e-06
## Achromobacter_43                                       2.157743e-08
## Enhydrobacter_70                                       1.314503e-01
## Aquabacterium_parvum_46                                5.885610e-05
## Corynebacterium_62                                     1.579959e-01
## Bosea_vestrisii_39                                     2.297808e-06
## Ralstonia_66                                           2.102730e-01
## Frankiales_158                                         2.927734e-01
## Thiobacillus_thioparus_49                              3.400270e-07
## Brevundimonas_kwangchunensis_65                        2.613777e-04
## Corynebacterium_44                                     3.151684e-01
## Massilia_111                                           3.183066e-01
## Noviherbaspirillum_suwonense_27                        4.680531e-02
## Aquabacterium_52                                       4.453621e-06
## Sphingomonas_koreensis_42                              5.799926e-02
## Bradyrhizobium_24                                      5.275101e-02
## Neisseria_118                                          3.911022e-01
## Anoxybacillus_102                                      3.225555e-05
## Pseudarthrobacter_80                                   5.291741e-04
## Psychroglaciecola_87                                   3.952425e-01
## Thermus_brockianus_50                                  7.993969e-03
## Cupriavidus_gilardii_67                                7.080388e-04
## Alcaligenes_60                                         2.904674e-04
## Sphingopyxis_48                                        1.332633e-03
## Rhodopseudomonas_41                                    3.563480e-01
## Haemophilus_114                                        4.605234e-01
## Nitriliruptoraceae_18                                  9.405865e-04
## Bosea_73                                               1.591980e-03
## Methylobacterium_Methylorubrum_32                      3.753814e-01
## Phenylobacterium_mobile_101                            4.690945e-01
## Micrococcus_97                                         4.935261e-01
## Staphylococcus_17                                      1.014382e-01
## Sphingomonadaceae_84                                   3.968355e-01
## Fluviicola_76                                          6.498578e-04
## Neisseria_63                                           1.010447e-02
## Halomonas_94                                           4.424957e-01
## Bosea_96                                               6.673908e-03
## Brevundimonas_53                                       1.201825e-02
## Aquabacterium_47                                       3.962734e-03
## Methylobacillus_98                                     7.984282e-04
## Sphingobium_81                                         1.946964e-02
## Brevundimonas_149                                      6.134507e-01
## Haliangium_107                                         6.256781e-04
## Methylobacterium_Methylorubrum_91                      1.903652e-02
## Brachymonas_75                                         1.345391e-02
## Methylopilaceae_176                                    5.109578e-03
## Skermanella_aerolata_77                                2.564285e-02
## Meiothermus_58                                         5.361658e-02
## Meiothermus_152                                        1.212925e-02
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  5.192911e-01
## Streptococcus_69                                       1.135578e-01
## Klenkia_140                                            1.940022e-02
## Limnohabitans_82                                       1.065426e-01
## Pseudomonas_145                                        1.984754e-02
## Brevundimonas_126                                      8.010057e-03
## PMMR1_132                                              3.012804e-02
## Variovorax_paradoxus_103                               5.447124e-02
## Cupriavidus_78                                         4.963773e-02
## Proteus_89                                             2.163589e-02
## Sphingoaurantiacus_polygranulatus_168                  2.243925e-02
## Yonghaparkia_123                                       3.125875e-02
## Caulobacter_169                                        2.331069e-02
## Tepidimonas_128                                        1.321802e-02
## Acinetobacter_88                                       5.587270e-02
## Haemophilus_54                                         1.321370e-01
## Asticcacaulis_excentricus_117                          9.246567e-03
## Tepidiphilus_succinatimandens_106                      2.546717e-02
## Duganella_166                                          8.043543e-02
## Reyranella_massiliensis_110                            8.672789e-03
## Sphingobium_yanoikuyae_120                             2.686403e-02
## Acinetobacter_100                                      2.757206e-02
## Acinetobacter_lwoffii_175                              6.510828e-02
## Stenotrophomonas_129                                   4.725258e-02
## Devosia_neptuniae_146                                  3.500226e-02
## Enterobacterales_198                                   6.860844e-02
## Sphingopyxis_122                                       2.409930e-02
## Pseudomonas_86                                         2.032101e-02
## Porphyromonas_gingivalis_193                           4.988762e-02
## Devosia_288                                            3.160875e-02
## Brevibacillus_208                                      3.081548e-02
## Leifsonia_188                                          5.043136e-02
## Escherichia/Shigella_93                                6.715784e-01
## Pseudomonas_105                                        3.962253e-02
## Actinomyces_119                                        7.677352e-01
## Microvirga_189                                         8.671683e-02
## Sphingomonas_koreensis_116                             4.838087e-02
## Delftia_21                                             5.689821e-01
## Providencia_130                                        1.792557e-02
## Brevundimonas_74                                       7.010707e-01
## Janibacter_147                                         7.416741e-02
## Phreatobacter_oligotrophus_186                         3.755457e-02
## Patulibacter_minatonensis_217                          3.955439e-02
## Galbitalea_203                                         9.358529e-02
## Methylobacterium_Methylorubrum_240                     8.483579e-02
## Luteimonas_209                                         6.634018e-02
## Rhodopseudomonas_155                                   1.865624e-01
## Paucibacter_19                                         2.471781e-01
## Devosia_148                                            1.043071e-01
## Dolosigranulum_pigrum_30                               6.857681e-01
## Anoxybacillus_127                                      2.254243e-01
## Herbiconiux_185                                        7.594901e-02
## Tepidiphilus_232                                       6.814682e-02
## Acidovorax_218                                         1.083226e-01
## Pedobacter_381                                         4.342814e-02
## Turicella_otitidis_268                                 9.691053e-02
## Novosphingobium_159                                    2.595046e-01
## Methylopila_oligotropha_112                            1.659667e-01
## Legionella_lytica_244                                  5.683997e-02
## Cnuella_349                                            5.657151e-02
## Aerococcus_233                                         7.981835e-02
## Massilia_214                                           1.288434e-01
## Nocardioides_95                                        8.265498e-01
## Sphingomonas_184                                       1.843942e-01
## Methylophilus_263                                      7.313409e-02
## Paucibacter_151                                        2.921705e-01
## Bdellovibrio_194                                       1.065528e-01
## Afipia_72                                              7.569839e-01
## Streptococcus_303                                      1.040578e-01
## Caulobacteraceae_182                                   7.977001e-02
## Methylobacterium_Methylorubrum_246                     1.224858e-01
## Prevotella_histicola_247                               1.183001e-01
## Burkholderia_Caballeronia_Paraburkholderia_201         1.397200e-01
## Acetitomaculum_362                                     6.102415e-02
## Candidatus_Paracaedibacter_347                         6.514235e-02
## Hansschlegelia_242                                     1.260753e-01
## Rhodopseudomonas_156                                   2.270421e-01
## Aquabacterium_228                                      1.383151e-01
## Sphingosinicella_163                                   2.083810e-01
## Methylobacterium_Methylorubrum_61                      7.174735e-01
## Sphingobium_205                                        1.181159e-01
## Corynebacterium_matruchotii_85                         2.127574e-01
## Bosea_211                                              6.213328e-02
## Sphingomonas_367                                       1.142700e-01
## Blastomonas_131                                        1.111069e-01
## Thermomonas_hydrothermalis_363                         1.078429e-01
## Mesorhizobium_134                                      2.945644e-01
## Prevotella_248                                         1.416500e-01
## Pseudoxanthomonas_mexicana_289                         1.281048e-01
## Burkholderia_Caballeronia_Paraburkholderia_374         1.136407e-01
## Ensifer_365                                            1.182579e-01
## Quadrisphaera_271                                      1.437940e-01
## Kocuria_299                                            1.339846e-01
## Bosea_231                                              6.593237e-02
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199 3.024871e-01
## Caulobacter_272                                        1.664370e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314 1.307196e-01
## Abiotrophia_defectiva_181                              1.763091e-01
## Granulicatella_167                                     1.590461e-01
## Klebsiella_245                                         1.208216e-01
## Pyrinomonas_207                                        7.275370e-02
## Sphingomonas_141                                       3.161995e-01
## Fimbriiglobus_223                                      1.815070e-01
## KD4_96_297                                             1.481185e-01
## Gemella_213                                            1.767895e-01
## Brevundimonas_124                                      1.288055e-01
## Brevundimonas_135                                      3.821462e-01
## Novosphingobium_311                                    2.799985e-01
## Roseomonas_cervicalis_243                              1.320068e-01
## Kocuria_330                                            1.477001e-01
## Novispirillum_220                                      1.317027e-01
## Veillonella_348                                        1.536601e-01
## Vulcaniibacterium_thermophilum_321                     1.668350e-01
## Phenylobacterium_286                                   1.620760e-01
## Methylobacterium_Methylorubrum_265                     1.201515e-01
## Dietzia_109                                            3.946120e-01
## Burkholderia_Caballeronia_Paraburkholderia_55          8.123723e-01
## UCG_005_354                                            1.625774e-01
## Stenotrophomonas_115                                   2.911669e-01
## Vulcaniibacterium_139                                  1.339473e-01
## Porphyromonas_254                                      1.941008e-01
## Microbacteriaceae_71                                   3.383719e-01
## Alloprevotella_219                                     2.792045e-01
## Flavihumibacter_165                                    2.068406e-01
## Lawsonella_clevelandensis_143                          4.544566e-01
## Pseudoxanthomonas_447                                  1.805205e-01
## Caulobacteraceae_92                                    5.161264e-01
## Sphingobium_137                                        8.929018e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 5.733369e-01
## Alphaproteobacteria_187                                2.261704e-01
## Bacillus_83                                            5.861810e-01
## Candidatus_Paracaedibacter_150                         2.211445e-01
## Pseudomonas_12                                         6.278499e-01
## Mesorhizobium_294                                      3.308037e-01
## Acetobacteraceae_230                                   5.456696e-01
## Moraxella_37                                           9.126212e-01
## Staphylococcus_51                                      7.626652e-01
## Streptococcus_216                                      4.358868e-01
## Sphingomonas_8                                         8.820945e-01
## Haemophilus_133                                        7.520814e-01
## Hydrocarboniphaga_389                                  6.975722e-01
## Stenotrophomonas_282                                   7.337314e-01
## Ellin6055_144                                          7.103130e-01
## Finegoldia_171                                         7.725898e-01
## Staphylococcus_264                                     6.882199e-01
## Halomonas_178                                          7.102242e-01
## Corynebacterium_59                                     8.041996e-01
## Gammaproteobacteria_226                                4.704335e-01
## Rhodococcus_221                                        7.542210e-01
## Limnobacter_thiooxidans_236                            7.728839e-01
## Stenotrophomonas_277                                   7.145002e-01
## Belnapia_rosea_259                                     8.298597e-01
## Geodermatophilus_234                                   7.774430e-01
## Cellulomonas_360                                       8.057703e-01
## Brachybacterium_200                                    8.740092e-01
## Micrococcaceae_212                                     8.622178e-01
## Streptococcus_195                                      8.774167e-01
## Pseudomonas_154                                        9.822444e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 8.669188e-01
## DSSD61_338                                             8.864898e-01
## Frankiales_280                                         9.209308e-01
## Dietzia_timorensis_339                                 9.350676e-01
## Paenarthrobacter_344                                   9.391045e-01
## Ruminiclostridium_341                                  9.471013e-01
## Ralstonia_121                                          9.681614e-01
## Paracoccus_206                                         9.591093e-01
## Clostridium_sensu_stricto_1_293                        9.867624e-01
## Streptococcus_90                                       9.988089e-01
##                                                          adjPvalues
## Curvibacter_2                                          1.224259e-11
## Thermus_thermophilus_10                                6.528664e-06
## Sphingobium_11                                         6.715420e-06
## Schlegelella_4                                         1.224259e-11
## Tepidimonas_1                                          0.000000e+00
## Caulobacter_6                                          1.224259e-11
## Comamonadaceae_7                                       1.224259e-11
## Bosea_9                                                2.910971e-11
## Lactococcus_31                                         0.000000e+00
## Thermus_5                                              1.050051e-09
## Meiothermus_silvanus_16                                1.786514e-10
## Acinetobacter_79                                       8.101702e-02
## Azospirillum_15                                        1.224259e-11
## Brevundimonas_20                                       1.212522e-09
## Ottowia_14                                             2.351390e-09
## Corynebacterium_35                                     1.455292e-01
## Methyloversatilis_23                                   7.540384e-10
## Blastococcus_57                                        1.489806e-01
## Methylobacterium_Methylorubrum_26                      7.272415e-02
## Methylobacterium_Methylorubrum_22                      1.446063e-02
## Streptococcus_34                                       1.081560e-01
## Methylobacterium_Methylorubrum_13                      7.666234e-04
## Pseudomonas_japonica_45                                8.101702e-02
## Thermus_3                                              1.513037e-05
## Cloacibacterium_56                                     1.443380e-01
## Xanthobacter_autotrophicus_29                          9.041076e-09
## Caulobacter_104                                        2.193227e-01
## Comamonas_25                                           2.960422e-05
## Pseudomonas_33                                         4.883307e-02
## Bosea_36                                               3.472987e-02
## Bacteriovorax_stolpii_38                               2.052480e-06
## Phenylobacterium_muchangponense_40                     5.102793e-06
## Brevundimonas_28                                       1.614856e-05
## Achromobacter_43                                       3.581853e-07
## Enhydrobacter_70                                       2.316817e-01
## Aquabacterium_parvum_46                                5.427840e-04
## Corynebacterium_62                                     2.588223e-01
## Bosea_vestrisii_39                                     2.487627e-05
## Ralstonia_66                                           3.116546e-01
## Frankiales_158                                         4.050033e-01
## Thiobacillus_thioparus_49                              4.980396e-06
## Brevundimonas_kwangchunensis_65                        2.244243e-03
## Corynebacterium_44                                     4.279005e-01
## Massilia_111                                           4.284234e-01
## Noviherbaspirillum_suwonense_27                        1.434865e-01
## Aquabacterium_52                                       4.435807e-05
## Sphingomonas_koreensis_42                              1.504356e-01
## Bradyrhizobium_24                                      1.475843e-01
## Neisseria_118                                          5.093404e-01
## Anoxybacillus_102                                      3.089089e-04
## Pseudarthrobacter_80                                   4.250463e-03
## Psychroglaciecola_87                                   5.093404e-01
## Thermus_brockianus_50                                  4.432232e-02
## Cupriavidus_gilardii_67                                5.185343e-03
## Alcaligenes_60                                         2.410879e-03
## Sphingopyxis_48                                        8.968257e-03
## Rhodopseudomonas_41                                    4.719715e-01
## Haemophilus_114                                        5.791431e-01
## Nitriliruptoraceae_18                                  6.505723e-03
## Bosea_73                                               1.043166e-02
## Methylobacterium_Methylorubrum_32                      4.945501e-01
## Phenylobacterium_mobile_101                            5.856897e-01
## Micrococcus_97                                         6.113831e-01
## Staphylococcus_17                                      2.177424e-01
## Sphingomonadaceae_84                                   5.093404e-01
## Fluviicola_76                                          4.903472e-03
## Neisseria_63                                           5.134723e-02
## Halomonas_94                                           5.621502e-01
## Bosea_96                                               3.864658e-02
## Brevundimonas_53                                       5.921930e-02
## Aquabacterium_47                                       2.466802e-02
## Methylobacillus_98                                     5.680246e-03
## Sphingobium_81                                         8.101702e-02
## Brevundimonas_149                                      7.343713e-01
## Haliangium_107                                         4.868558e-03
## Methylobacterium_Methylorubrum_91                      8.101702e-02
## Brachymonas_75                                         6.320801e-02
## Methylopilaceae_176                                    3.103134e-02
## Skermanella_aerolata_77                                9.389809e-02
## Meiothermus_58                                         1.483392e-01
## Meiothermus_152                                        5.921930e-02
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  6.369630e-01
## Streptococcus_69                                       2.240412e-01
## Klenkia_140                                            8.101702e-02
## Limnohabitans_82                                       2.193227e-01
## Pseudomonas_145                                        8.101702e-02
## Brevundimonas_126                                      4.432232e-02
## PMMR1_132                                              1.056603e-01
## Variovorax_paradoxus_103                               1.489806e-01
## Cupriavidus_78                                         1.443380e-01
## Proteus_89                                             8.551328e-02
## Sphingoaurantiacus_polygranulatus_168                  8.730271e-02
## Yonghaparkia_123                                       1.063592e-01
## Caulobacter_169                                        8.929787e-02
## Tepidimonas_128                                        6.320801e-02
## Acinetobacter_88                                       1.489806e-01
## Haemophilus_54                                         2.316817e-01
## Asticcacaulis_excentricus_117                          4.883307e-02
## Tepidiphilus_succinatimandens_106                      9.389809e-02
## Duganella_166                                          1.804362e-01
## Reyranella_massiliensis_110                            4.694619e-02
## Sphingobium_yanoikuyae_120                             9.694410e-02
## Acinetobacter_100                                      9.807776e-02
## Acinetobacter_lwoffii_175                              1.619481e-01
## Stenotrophomonas_129                                   1.434865e-01
## Devosia_neptuniae_146                                  1.146785e-01
## Enterobacterales_198                                   1.642644e-01
## Sphingopyxis_122                                       9.092010e-02
## Pseudomonas_86                                         8.161181e-02
## Porphyromonas_gingivalis_193                           1.443380e-01
## Devosia_288                                            1.063592e-01
## Brevibacillus_208                                      1.063592e-01
## Leifsonia_188                                          1.443380e-01
## Escherichia/Shigella_93                                7.963001e-01
## Pseudomonas_105                                        1.248862e-01
## Actinomyces_119                                        8.515403e-01
## Microvirga_189                                         1.910840e-01
## Sphingomonas_koreensis_116                             1.443380e-01
## Delftia_21                                             6.911051e-01
## Providencia_130                                        8.101702e-02
## Brevundimonas_74                                       8.157318e-01
## Janibacter_147                                         1.725952e-01
## Phreatobacter_oligotrophus_186                         1.214427e-01
## Patulibacter_minatonensis_217                          1.248862e-01
## Galbitalea_203                                         2.044100e-01
## Methylobacterium_Methylorubrum_240                     1.886082e-01
## Luteimonas_209                                         1.619481e-01
## Rhodopseudomonas_155                                   2.832563e-01
## Paucibacter_19                                         3.537203e-01
## Devosia_148                                            2.193227e-01
## Dolosigranulum_pigrum_30                               8.083337e-01
## Anoxybacillus_127                                      3.267832e-01
## Herbiconiux_185                                        1.751047e-01
## Tepidiphilus_232                                       1.642644e-01
## Acidovorax_218                                         2.193227e-01
## Pedobacter_381                                         1.351701e-01
## Turicella_otitidis_268                                 2.098324e-01
## Novosphingobium_159                                    3.692380e-01
## Methylopila_oligotropha_112                            2.629235e-01
## Legionella_lytica_244                                  1.489806e-01
## Cnuella_349                                            1.489806e-01
## Aerococcus_233                                         1.804362e-01
## Massilia_214                                           2.316817e-01
## Nocardioides_95                                        8.906683e-01
## Sphingomonas_184                                       2.816820e-01
## Methylophilus_263                                      1.717961e-01
## Paucibacter_151                                        4.050033e-01
## Bdellovibrio_194                                       2.193227e-01
## Afipia_72                                              8.490495e-01
## Streptococcus_303                                      2.193227e-01
## Caulobacteraceae_182                                   1.804362e-01
## Methylobacterium_Methylorubrum_246                     2.293155e-01
## Prevotella_histicola_247                               2.265902e-01
## Burkholderia_Caballeronia_Paraburkholderia_201         2.382896e-01
## Acetitomaculum_362                                     1.566496e-01
## Candidatus_Paracaedibacter_347                         1.619481e-01
## Hansschlegelia_242                                     2.316817e-01
## Rhodopseudomonas_156                                   3.267832e-01
## Aquabacterium_228                                      2.375204e-01
## Sphingosinicella_163                                   3.106998e-01
## Methylobacterium_Methylorubrum_61                      8.194995e-01
## Sphingobium_205                                        2.265902e-01
## Corynebacterium_matruchotii_85                         3.134710e-01
## Bosea_211                                              1.578693e-01
## Sphingomonas_367                                       2.240412e-01
## Blastomonas_131                                        2.231098e-01
## Thermomonas_hydrothermalis_363                         2.193227e-01
## Mesorhizobium_134                                      4.052295e-01
## Prevotella_248                                         2.399377e-01
## Pseudoxanthomonas_mexicana_289                         2.316817e-01
## Burkholderia_Caballeronia_Paraburkholderia_374         2.240412e-01
## Ensifer_365                                            2.265902e-01
## Quadrisphaera_271                                      2.419237e-01
## Kocuria_299                                            2.316817e-01
## Bosea_231                                              1.619481e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199 4.138422e-01
## Caulobacter_272                                        2.629235e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314 2.316817e-01
## Abiotrophia_defectiva_181                              2.751287e-01
## Granulicatella_167                                     2.588398e-01
## Klebsiella_245                                         2.279134e-01
## Pyrinomonas_207                                        1.717961e-01
## Sphingomonas_141                                       4.279005e-01
## Fimbriiglobus_223                                      2.789830e-01
## KD4_96_297                                             2.458768e-01
## Gemella_213                                            2.751287e-01
## Brevundimonas_124                                      2.316817e-01
## Brevundimonas_135                                      5.008127e-01
## Novosphingobium_311                                    3.938963e-01
## Roseomonas_cervicalis_243                              2.316817e-01
## Kocuria_330                                            2.458768e-01
## Novispirillum_220                                      2.316817e-01
## Veillonella_348                                        2.533865e-01
## Vulcaniibacterium_thermophilum_321                     2.629235e-01
## Phenylobacterium_286                                   2.611728e-01
## Methylobacterium_Methylorubrum_265                     2.279134e-01
## Dietzia_109                                            5.093404e-01
## Burkholderia_Caballeronia_Paraburkholderia_55          8.794813e-01
## UCG_005_354                                            2.611728e-01
## Stenotrophomonas_115                                   4.050033e-01
## Vulcaniibacterium_139                                  2.316817e-01
## Porphyromonas_254                                      2.929158e-01
## Microbacteriaceae_71                                   4.505593e-01
## Alloprevotella_219                                     3.938963e-01
## Flavihumibacter_165                                    3.102609e-01
## Lawsonella_clevelandensis_143                          5.744146e-01
## Pseudoxanthomonas_447                                  2.789830e-01
## Caulobacteraceae_92                                    6.362152e-01
## Sphingobium_137                                        9.302617e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 6.930141e-01
## Alphaproteobacteria_187                                3.267832e-01
## Bacillus_83                                            7.051163e-01
## Candidatus_Paracaedibacter_150                         3.239117e-01
## Pseudomonas_12                                         7.480126e-01
## Mesorhizobium_294                                      4.428501e-01
## Acetobacteraceae_230                                   6.660379e-01
## Moraxella_37                                           9.468445e-01
## Staphylococcus_51                                      8.515403e-01
## Streptococcus_216                                      5.565940e-01
## Sphingomonas_8                                         9.267575e-01
## Haemophilus_133                                        8.490495e-01
## Hydrocarboniphaga_389                                  8.154718e-01
## Stenotrophomonas_282                                   8.342425e-01
## Ellin6055_144                                          8.188330e-01
## Finegoldia_171                                         8.515403e-01
## Staphylococcus_264                                     8.083337e-01
## Halomonas_178                                          8.188330e-01
## Corynebacterium_59                                     8.761432e-01
## Gammaproteobacteria_226                                5.856897e-01
## Rhodococcus_221                                        8.490495e-01
## Limnobacter_thiooxidans_236                            8.515403e-01
## Stenotrophomonas_277                                   8.194995e-01
## Belnapia_rosea_259                                     8.906683e-01
## Geodermatophilus_234                                   8.527899e-01
## Cellulomonas_360                                       8.761432e-01
## Brachybacterium_200                                    9.257490e-01
## Micrococcaceae_212                                     9.214259e-01
## Streptococcus_195                                      9.257490e-01
## Pseudomonas_154                                        9.901978e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 9.224905e-01
## DSSD61_338                                             9.274620e-01
## Frankiales_280                                         9.515011e-01
## Dietzia_timorensis_339                                 9.621151e-01
## Paenarthrobacter_344                                   9.622922e-01
## Ruminiclostridium_341                                  9.665092e-01
## Ralstonia_121                                          9.799682e-01
## Paracoccus_206                                         9.747683e-01
## Clostridium_sensu_stricto_1_293                        9.907413e-01
## Streptococcus_90                                       9.988089e-01

7.2.1.1 STGG vs BLank Volcano plot

EnhancedVolcano(VP.df_SB,lab = rownames(VP.df_SB),x = 'logFC',y = 'adjPvalues', 
                #selectLab = c("Corynebacterium_44", "Lactococcus_31", "Thermus_thermophilus_10"),
                pointSize = 3.0, labSize = 5, labhjust = 0.5, pCutoff = .02, xlim = c(-7, 7), gridlines.major = TRUE, cutoffLineWidth = 0.2,cutoffLineCol = 'grey30', FCcutoff = .5)#+
## Warning: One or more p-values is 0. Converting to 10^-1 * current lowest non-
## zero p-value...

  #ggsave("VolcanoPlot_fitFeatureModel.tiff", units="in", width=8, height=6, dpi=300, compression = 'lzw')

Too many ASVs are identifed as differentially abundant as the batch effect cannot be accounted for in fitFeatureModel

7.2.2 STGG vs RNA_protect

ps_SR <- subset_samples(ps_filtered, sample_data(ps_filtered)$Sample_type!="blank")
ps_SR <- prune_taxa(taxa_sums(ps_SR)>0, ps_SR)

metaSeq_SR <- phyloseq_to_metagenomeSeq(ps_SR) # raw sequence count phyloseq
metaSeq_norm_SR <- cumNorm(metaSeq_SR, p=0.5) # internal normalisation
mod3_SR <- model.matrix(~ Sample_type, pData(metaSeq_norm_SR)) # formula
fit_SR <-  fitFeatureModel(metaSeq_norm_SR, mod3_SR) # NOT fitZig; gives higher # false-positives
## Warning: Partial NA coefficients for 185 probe(s)
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
VP.df_SR <- MRcoefs(fit_SR, number = Inf, alpha = 1, adjustMethod = "BH") # extract all output (not only significant)
VP.df_SR
##                                                              logFC        se
## Tepidimonas_1                                           6.97070502 0.2795577
## Curvibacter_2                                          -6.24110034 0.1640993
## Thermus_5                                               5.31328439 0.2641883
## Schlegelella_4                                         -4.43167029 0.3359404
## Thermus_thermophilus_10                                 4.34493613 0.2748836
## Caulobacter_6                                          -4.01819870 0.3406502
## Comamonadaceae_7                                       -3.78823574 0.3184097
## Methylobacterium_Methylorubrum_13                       3.71762209 0.5684487
## Bosea_9                                                -3.62385890 0.3466753
## Sphingobium_11                                         -3.57184203 0.8125304
## Sphingomonas_8                                          3.49826241 0.4707445
## Azospirillum_15                                        -3.20567100 0.2693551
## Ottowia_14                                             -3.18774879 0.3330265
## Brevundimonas_20                                       -3.02789241 0.2404451
## Meiothermus_silvanus_16                                -2.87911611 0.2478594
## Methyloversatilis_23                                   -2.85708004 0.2488119
## Lactococcus_31                                          2.76329154 0.4921029
## Bradyrhizobium_24                                       2.74128930 0.4752452
## Methylobacterium_Methylorubrum_22                       2.59214430 0.6106603
## Methylobacterium_Methylorubrum_26                       2.52071130 0.6694787
## Noviherbaspirillum_suwonense_27                         2.46627048 0.5861041
## Achromobacter_43                                       -2.33850457 0.3584676
## Brevundimonas_28                                       -2.19874042 0.3609625
## Xanthobacter_autotrophicus_29                          -2.03969757 0.3673875
## Pseudomonas_japonica_45                                 1.95867059 0.5294984
## Bacteriovorax_stolpii_38                               -1.90187928 0.3212444
## Thermus_3                                              -1.77189327 0.7118463
## Delftia_21                                              1.62939247 0.6967945
## Aquabacterium_47                                       -1.60303726 0.3378383
## Microbacteriaceae_71                                   -1.57212904 1.1103112
## Phenylobacterium_muchangponense_40                     -1.45588757 0.2775335
## Sphingomonas_koreensis_42                              -1.43314371 0.6516082
## Rhodopseudomonas_41                                     1.37002692 0.5900650
## Sphingopyxis_48                                        -1.31070065 0.2830457
## Aquabacterium_52                                       -1.29643052 0.3529393
## Comamonas_25                                           -1.24663060 0.3439378
## Pseudomonas_86                                         -1.22928284 0.3065503
## Thiobacillus_thioparus_49                              -1.22670334 0.2938609
## Proteus_89                                             -1.21328068 0.3120496
## Brevundimonas_kwangchunensis_65                         1.20144086 0.5868756
## Vulcaniibacterium_139                                  -1.17541331 0.3259796
## Methylobacterium_Methylorubrum_61                       1.16717390 0.5060966
## Streptococcus_34                                        1.11443869 0.6910950
## Sphingomonas_koreensis_116                             -1.11276566 0.3167895
## Aquabacterium_parvum_46                                -1.10431391 0.3968097
## Moraxella_37                                           -1.07005629 0.7173571
## Brevundimonas_126                                      -0.99760750 0.2626333
## Anoxybacillus_102                                       0.92158229 0.4349409
## Brevundimonas_53                                       -0.92112062 0.3468231
## Pseudarthrobacter_80                                    0.91996677 0.5016247
## Dolosigranulum_pigrum_30                               -0.91116270 0.7191598
## Pseudomonas_105                                        -0.87110666 0.2619542
## Meiothermus_58                                         -0.85390360 0.4491343
## Nitriliruptoraceae_18                                   0.85026708 0.5783190
## Blastomonas_131                                        -0.84422493 0.2482504
## Caulobacter_104                                         0.84362009 0.4713177
## Enhydrobacter_70                                        0.77791162 0.4997622
## Reyranella_massiliensis_110                            -0.75783249 0.2319996
## Gammaproteobacteria_226                                -0.75610411 0.2353995
## Bosea_36                                                0.75156181 0.4488534
## Alcaligenes_60                                         -0.75126540 0.2495878
## Thermus_brockianus_50                                   0.73234792 0.5839168
## Candidatus_Paracaedibacter_150                         -0.69739840 0.2670142
## Neisseria_63                                            0.69693216 0.5337677
## Asticcacaulis_excentricus_117                          -0.68890891 0.2144400
## Limnohabitans_82                                        0.68567026 0.5024730
## Cloacibacterium_56                                     -0.67622960 0.9086949
## Bosea_96                                                0.66706829 0.4811063
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64   0.66462104 0.5074419
## Methylobacterium_Methylorubrum_32                       0.65828020 0.6380167
## Psychroglaciecola_87                                    0.63965635 0.4331892
## Acinetobacter_79                                        0.62890401 0.5417117
## Afipia_72                                               0.62064142 0.4625793
## Stenotrophomonas_129                                   -0.61699215 0.9719140
## Methylopilaceae_176                                     0.59479761 0.3894093
## Staphylococcus_17                                      -0.58377940 0.5882377
## Meiothermus_152                                         0.58078591 0.4113512
## Skermanella_aerolata_77                                 0.56916701 0.4402225
## Sphingobium_81                                          0.56738249 0.4862287
## Bdellovibrio_194                                       -0.55697889 0.2162473
## Methylobacterium_Methylorubrum_91                       0.54260280 0.4689460
## Phenylobacterium_mobile_101                             0.53826081 0.4182635
## Duganella_166                                           0.52528575 0.3846637
## Corynebacterium_59                                     -0.51998365 0.4102519
## Burkholderia_Caballeronia_Paraburkholderia_55           0.50890240 0.7677447
## Halomonas_94                                            0.50243733 0.4508965
## Cupriavidus_78                                         -0.49702649 0.2643444
## Brevundimonas_124                                      -0.49702649 0.2643444
## Klenkia_140                                             0.49344233 0.4086333
## Cupriavidus_gilardii_67                                -0.49342368 0.2278791
## Ralstonia_66                                            0.48577553 0.5632072
## Pseudomonas_145                                         0.47296785 0.3989543
## Blastococcus_57                                         0.46724604 0.5405812
## Streptococcus_90                                        0.46093782 0.3780663
## Brevundimonas_74                                        0.45199336 0.4054479
## Bosea_73                                               -0.44793699 0.2127087
## Bosea_vestrisii_39                                     -0.43772991 0.2662409
## Sphingoaurantiacus_polygranulatus_168                   0.43717586 0.3734286
## Enterobacterales_198                                    0.43487539 0.3755294
## Devosia_148                                            -0.43313863 0.2375248
## Devosia_288                                             0.42695319 0.3228906
## Haemophilus_114                                         0.42501203 0.3893724
## Corynebacterium_35                                     -0.42243076 0.7018189
## Sphingobium_137                                         0.42115037 0.3533464
## Sphingopyxis_122                                       -0.41974505 0.2574876
## Rhodopseudomonas_155                                    0.41385197 0.3468228
## Anoxybacillus_127                                       0.41049777 0.4005367
## Variovorax_paradoxus_103                                0.40504486 0.4416637
## Caulobacter_169                                         0.40469615 0.3647312
## Neisseria_118                                           0.40225695 0.3867020
## Lawsonella_clevelandensis_143                          -0.40203961 0.2352482
## Haliangium_107                                         -0.39675212 0.1962045
## Tepidiphilus_succinatimandens_106                      -0.38657386 0.1930070
## Alphaproteobacteria_187                                -0.38205766 0.2167636
## Porphyromonas_gingivalis_193                            0.37641294 0.3608495
## Frankiales_158                                          0.37617955 0.3281536
## Brachymonas_75                                         -0.37577483 0.1896487
## Pyrinomonas_207                                        -0.37577483 0.1896487
## Corynebacterium_62                                      0.37336476 0.8622774
## Microvirga_189                                          0.37270458 0.3764855
## Leifsonia_188                                           0.35890141 0.3596252
## Yonghaparkia_123                                        0.35680947 0.3720866
## Methylobacterium_Methylorubrum_240                      0.35564666 0.3464484
## Haemophilus_54                                          0.35459905 0.5150324
## Brevibacillus_208                                       0.35406110 0.3283611
## Novosphingobium_159                                     0.34213133 0.3586758
## Galbitalea_203                                          0.33903108 0.3599674
## Tepidimonas_128                                        -0.33875732 0.1784318
## Nocardioides_95                                         0.33358902 0.3838843
## Sphingosinicella_163                                   -0.33191695 0.2027660
## Sphingobium_yanoikuyae_120                             -0.32463455 0.1944096
## Staphylococcus_51                                       0.32437208 0.4613719
## Stenotrophomonas_115                                   -0.32404687 0.2573084
## Fluviicola_76                                          -0.31709561 0.1992218
## Brevundimonas_135                                       0.31673745 0.3288921
## Pedobacter_381                                          0.30965642 0.2723438
## Streptococcus_216                                      -0.30831437 0.2683508
## Devosia_neptuniae_146                                   0.29987490 0.3267839
## Acidovorax_218                                          0.29987470 0.3457418
## Turicella_otitidis_268                                  0.29897567 0.3190660
## Methylobacillus_98                                     -0.29681603 0.1910477
## Corynebacterium_44                                      0.29591117 0.4156110
## Flavihumibacter_165                                    -0.29190165 0.1650010
## Novispirillum_220                                      -0.29190165 0.1650010
## Luteimonas_209                                          0.28917621 0.3270533
## Rhodopseudomonas_156                                    0.28894144 0.3407201
## Streptococcus_303                                       0.28190357 0.3049791
## Cnuella_349                                             0.27884487 0.2765651
## Patulibacter_minatonensis_217                           0.27490719 0.2943589
## PMMR1_132                                              -0.27305407 0.1598850
## Massilia_214                                            0.26983411 0.3340728
## Dietzia_109                                             0.26881493 0.3619364
## Methylobacterium_Methylorubrum_246                      0.26706833 0.3191631
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199  0.26648968 0.3078305
## Prevotella_histicola_247                                0.26470197 0.3164458
## Pseudomonas_154                                         0.26210093 0.3079683
## Janibacter_147                                          0.26187876 0.3343308
## Ralstonia_121                                          -0.26012014 0.3008987
## Acetitomaculum_362                                      0.25692882 0.2647127
## Mesorhizobium_294                                      -0.25542587 0.2831383
## Acinetobacter_lwoffii_175                               0.25336670 0.3859160
## Sphingomonas_367                                        0.25282679 0.2821779
## Thermomonas_hydrothermalis_363                          0.24960491 0.2775825
## Brevundimonas_149                                       0.24849926 0.2929445
## Candidatus_Paracaedibacter_347                          0.24519746 0.2650427
## Methylophilus_263                                       0.24476389 0.2847002
## Herbiconiux_185                                         0.24321306 0.3129305
## Pseudomonas_12                                         -0.24238157 0.2817117
## Hansschlegelia_242                                      0.23878899 0.3113100
## Pseudomonas_33                                          0.23623458 0.6635933
## Burkholderia_Caballeronia_Paraburkholderia_374          0.23527949 0.2699970
## Ensifer_365                                             0.22930296 0.2717346
## Aerococcus_233                                          0.22886065 0.2913246
## Burkholderia_Caballeronia_Paraburkholderia_201          0.22297233 0.3239246
## Bacillus_83                                             0.22296991 0.3922840
## Pseudoxanthomonas_mexicana_289                          0.22216466 0.2833979
## Aquabacterium_228                                       0.21991132 0.3131688
## Kocuria_299                                             0.21597784 0.2809676
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314  0.21200870 0.2753780
## Quadrisphaera_271                                       0.21007764 0.2873930
## Prevotella_248                                          0.20800522 0.2949114
## Staphylococcus_264                                      0.20150599 0.2529007
## Roseomonas_cervicalis_243                              -0.20030395 0.1420839
## Methylopila_oligotropha_112                             0.19951463 0.3548809
## KD4_96_297                                              0.19789862 0.2755484
## Actinomyces_119                                        -0.19352141 0.2685084
## Veillonella_348                                         0.19228956 0.2662633
## Caulobacteraceae_92                                    -0.18971321 0.3160647
## Finegoldia_171                                          0.18940770 0.2733132
## Kocuria_330                                             0.18865768 0.2669600
## Granulicatella_167                                     -0.18763872 0.3305330
## Rhodococcus_221                                        -0.17891016 0.2262299
## Micrococcus_97                                          0.17660055 0.4483290
## Acetobacteraceae_230                                    0.17495878 0.2747634
## Paracoccus_206                                         -0.17322877 0.2690298
## Phenylobacterium_286                                    0.17267372 0.2689487
## Fimbriiglobus_223                                       0.17162735 0.2945532
## Belnapia_rosea_259                                      0.16980570 0.2490591
## Escherichia/Shigella_93                                 0.16614776 0.3166793
## Alloprevotella_219                                      0.16471180 0.2806883
## UCG_005_354                                             0.16450446 0.2510324
## Cellulomonas_360                                        0.16443948 0.2310102
## Abiotrophia_defectiva_181                               0.16104023 0.2939412
## Corynebacterium_matruchotii_85                          0.15764466 0.3383794
## Klebsiella_245                                         -0.15482199 0.3279593
## Micrococcaceae_212                                      0.14214380 0.2717018
## Halomonas_178                                           0.14181623 0.2902810
## Paucibacter_19                                         -0.13730890 0.7832094
## Streptococcus_195                                       0.13689492 0.2762044
## Pseudoxanthomonas_447                                   0.13678732 0.2211280
## Limnobacter_thiooxidans_236                             0.13435151 0.2681055
## Massilia_111                                            0.13342616 0.4254209
## Geodermatophilus_234                                    0.13219473 0.2563797
## Porphyromonas_254                                       0.12903873 0.2497705
## Streptococcus_69                                        0.11775201 0.2830651
## Stenotrophomonas_277                                    0.11608446 0.2391488
## Hydrocarboniphaga_389                                   0.10423832 0.1670795
## Dietzia_timorensis_339                                  0.10150963 0.2162692
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153  0.10095900 0.2159897
## Clostridium_sensu_stricto_1_293                         0.09870699 0.2190888
## Ruminiclostridium_341                                   0.08846199 0.1999172
## DSSD61_338                                              0.08261149 0.1914059
## Stenotrophomonas_282                                    0.07955370 0.2043566
## Haemophilus_133                                         0.07944131 0.1897275
## Ellin6055_144                                           0.07787436 0.2239909
## Sphingomonas_141                                       -0.06987880 0.3990292
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343  0.06688862 0.1878471
## Mesorhizobium_134                                      -0.06651635 0.4362674
## Frankiales_280                                          0.06613523 0.2001688
## Brachybacterium_200                                    -0.06418508 0.2754103
## Gemella_213                                            -0.04821954 0.3189291
## Paenarthrobacter_344                                    0.03570582 0.1821390
## Sphingomonadaceae_84                                   -0.02194046 0.3233208
## Acinetobacter_88                                        0.01804049 0.4297335
##                                                             pvalues
## Tepidimonas_1                                          0.000000e+00
## Curvibacter_2                                          0.000000e+00
## Thermus_5                                              0.000000e+00
## Schlegelella_4                                         0.000000e+00
## Thermus_thermophilus_10                                0.000000e+00
## Caulobacter_6                                          0.000000e+00
## Comamonadaceae_7                                       0.000000e+00
## Methylobacterium_Methylorubrum_13                      6.154233e-11
## Bosea_9                                                0.000000e+00
## Sphingobium_11                                         1.102899e-05
## Sphingomonas_8                                         1.074696e-13
## Azospirillum_15                                        0.000000e+00
## Ottowia_14                                             0.000000e+00
## Brevundimonas_20                                       0.000000e+00
## Meiothermus_silvanus_16                                0.000000e+00
## Methyloversatilis_23                                   0.000000e+00
## Lactococcus_31                                         1.962530e-08
## Bradyrhizobium_24                                      8.014267e-09
## Methylobacterium_Methylorubrum_22                      2.187669e-05
## Methylobacterium_Methylorubrum_26                      1.664256e-04
## Noviherbaspirillum_suwonense_27                        2.577489e-05
## Achromobacter_43                                       6.863310e-11
## Brevundimonas_28                                       1.119791e-09
## Xanthobacter_autotrophicus_29                          2.825857e-08
## Pseudomonas_japonica_45                                2.163607e-04
## Bacteriovorax_stolpii_38                               3.212567e-09
## Thermus_3                                              1.280485e-02
## Delftia_21                                             1.936589e-02
## Aquabacterium_47                                       2.085233e-06
## Microbacteriaceae_71                                   1.567944e-01
## Phenylobacterium_muchangponense_40                     1.555992e-07
## Sphingomonas_koreensis_42                              2.784986e-02
## Rhodopseudomonas_41                                    2.024242e-02
## Sphingopyxis_48                                        3.644255e-06
## Aquabacterium_52                                       2.394954e-04
## Comamonas_25                                           2.894297e-04
## Pseudomonas_86                                         6.070521e-05
## Thiobacillus_thioparus_49                              2.987254e-05
## Proteus_89                                             1.010311e-04
## Brevundimonas_kwangchunensis_65                        4.064029e-02
## Vulcaniibacterium_139                                  3.112068e-04
## Methylobacterium_Methylorubrum_61                      2.109792e-02
## Streptococcus_34                                       1.068381e-01
## Sphingomonas_koreensis_116                             4.436886e-04
## Aquabacterium_parvum_46                                5.386191e-03
## Moraxella_37                                           1.357870e-01
## Brevundimonas_126                                      1.455858e-04
## Anoxybacillus_102                                      3.410164e-02
## Brevundimonas_53                                       7.910164e-03
## Pseudarthrobacter_80                                   6.665784e-02
## Dolosigranulum_pigrum_30                               2.051616e-01
## Pseudomonas_105                                        8.828687e-04
## Meiothermus_58                                         5.727307e-02
## Nitriliruptoraceae_18                                  1.414971e-01
## Blastomonas_131                                        6.721382e-04
## Caulobacter_104                                        7.346710e-02
## Enhydrobacter_70                                       1.195742e-01
## Reyranella_massiliensis_110                            1.088764e-03
## Gammaproteobacteria_226                                1.318127e-03
## Bosea_36                                               9.405131e-02
## Alcaligenes_60                                         2.612262e-03
## Thermus_brockianus_50                                  2.097696e-01
## Candidatus_Paracaedibacter_150                         9.005625e-03
## Neisseria_63                                           1.916599e-01
## Asticcacaulis_excentricus_117                          1.315417e-03
## Limnohabitans_82                                       1.723816e-01
## Cloacibacterium_56                                     4.567695e-01
## Bosea_96                                               1.655852e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  1.902811e-01
## Methylobacterium_Methylorubrum_32                      3.021845e-01
## Psychroglaciecola_87                                   1.397772e-01
## Acinetobacter_79                                       2.456593e-01
## Afipia_72                                              1.796941e-01
## Stenotrophomonas_129                                   5.255447e-01
## Methylopilaceae_176                                    1.266527e-01
## Staphylococcus_17                                      3.209923e-01
## Meiothermus_152                                        1.579800e-01
## Skermanella_aerolata_77                                1.960430e-01
## Sphingobium_81                                         2.432489e-01
## Bdellovibrio_194                                       1.000498e-02
## Methylobacterium_Methylorubrum_91                      2.472443e-01
## Phenylobacterium_mobile_101                            1.981313e-01
## Duganella_166                                          1.720735e-01
## Corynebacterium_59                                     2.049859e-01
## Burkholderia_Caballeronia_Paraburkholderia_55          5.074243e-01
## Halomonas_94                                           2.651473e-01
## Cupriavidus_78                                         6.007764e-02
## Brevundimonas_124                                      6.007764e-02
## Klenkia_140                                            2.272231e-01
## Cupriavidus_gilardii_67                                3.036567e-02
## Ralstonia_66                                           3.884033e-01
## Pseudomonas_145                                        2.358123e-01
## Blastococcus_57                                        3.874010e-01
## Streptococcus_90                                       2.227689e-01
## Brevundimonas_74                                       2.649361e-01
## Bosea_73                                               3.521562e-02
## Bosea_vestrisii_39                                     1.001531e-01
## Sphingoaurantiacus_polygranulatus_168                  2.417161e-01
## Enterobacterales_198                                   2.468506e-01
## Devosia_148                                            6.822000e-02
## Devosia_288                                            1.860735e-01
## Haemophilus_114                                        2.750393e-01
## Corynebacterium_35                                     5.472350e-01
## Sphingobium_137                                        2.333039e-01
## Sphingopyxis_122                                       1.030684e-01
## Rhodopseudomonas_155                                   2.327650e-01
## Anoxybacillus_127                                      3.054249e-01
## Variovorax_paradoxus_103                               3.590960e-01
## Caulobacter_169                                        2.671828e-01
## Neisseria_118                                          2.982355e-01
## Lawsonella_clevelandensis_143                          8.745059e-02
## Haliangium_107                                         4.316237e-02
## Tepidiphilus_succinatimandens_106                      4.518792e-02
## Alphaproteobacteria_187                                7.797568e-02
## Porphyromonas_gingivalis_193                           2.968881e-01
## Frankiales_158                                         2.516495e-01
## Brachymonas_75                                         4.754354e-02
## Pyrinomonas_207                                        4.754354e-02
## Corynebacterium_62                                     6.650159e-01
## Microvirga_189                                         3.221949e-01
## Leifsonia_188                                          3.182855e-01
## Yonghaparkia_123                                       3.375879e-01
## Methylobacterium_Methylorubrum_240                     3.046323e-01
## Haemophilus_54                                         4.911389e-01
## Brevibacillus_208                                      2.809144e-01
## Novosphingobium_159                                    3.401476e-01
## Galbitalea_203                                         3.462755e-01
## Tepidimonas_128                                        5.762688e-02
## Nocardioides_95                                        3.848563e-01
## Sphingosinicella_163                                   1.016417e-01
## Sphingobium_yanoikuyae_120                             9.494936e-02
## Staphylococcus_51                                      4.820184e-01
## Stenotrophomonas_115                                   2.078962e-01
## Fluviicola_76                                          1.114586e-01
## Brevundimonas_135                                      3.355256e-01
## Pedobacter_381                                         2.555359e-01
## Streptococcus_216                                      2.505878e-01
## Devosia_neptuniae_146                                  3.587995e-01
## Acidovorax_218                                         3.857573e-01
## Turicella_otitidis_268                                 3.487412e-01
## Methylobacillus_98                                     1.202746e-01
## Corynebacterium_44                                     4.764706e-01
## Flavihumibacter_165                                    7.687880e-02
## Novispirillum_220                                      7.687880e-02
## Luteimonas_209                                         3.765954e-01
## Rhodopseudomonas_156                                   3.964203e-01
## Streptococcus_303                                      3.553108e-01
## Cnuella_349                                            3.133377e-01
## Patulibacter_minatonensis_217                          3.503460e-01
## PMMR1_132                                              8.767066e-02
## Massilia_214                                           4.192572e-01
## Dietzia_109                                            4.576553e-01
## Methylobacterium_Methylorubrum_246                     4.027179e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199 3.866533e-01
## Prevotella_histicola_247                               4.028824e-01
## Pseudomonas_154                                        3.947334e-01
## Janibacter_147                                         4.334554e-01
## Ralstonia_121                                          3.873256e-01
## Acetitomaculum_362                                     3.317500e-01
## Mesorhizobium_294                                      3.669910e-01
## Acinetobacter_lwoffii_175                              5.114810e-01
## Sphingomonas_367                                       3.702614e-01
## Thermomonas_hydrothermalis_363                         3.685408e-01
## Brevundimonas_149                                      3.962815e-01
## Candidatus_Paracaedibacter_347                         3.549012e-01
## Methylophilus_263                                      3.899407e-01
## Herbiconiux_185                                        4.370342e-01
## Pseudomonas_12                                         3.895747e-01
## Hansschlegelia_242                                     4.430544e-01
## Pseudomonas_33                                         7.218458e-01
## Burkholderia_Caballeronia_Paraburkholderia_374         3.835275e-01
## Ensifer_365                                            3.987539e-01
## Aerococcus_233                                         4.321098e-01
## Burkholderia_Caballeronia_Paraburkholderia_201         4.912347e-01
## Bacillus_83                                            5.697709e-01
## Pseudoxanthomonas_mexicana_289                         4.330801e-01
## Aquabacterium_228                                      4.825461e-01
## Kocuria_299                                            4.420755e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314 4.413696e-01
## Quadrisphaera_271                                      4.647933e-01
## Prevotella_248                                         4.806147e-01
## Staphylococcus_264                                     4.255793e-01
## Roseomonas_cervicalis_243                              1.586110e-01
## Methylopila_oligotropha_112                            5.739786e-01
## KD4_96_297                                             4.726346e-01
## Actinomyces_119                                        4.710772e-01
## Veillonella_348                                        4.701849e-01
## Caulobacteraceae_92                                    5.483494e-01
## Finegoldia_171                                         4.883057e-01
## Kocuria_330                                            4.797598e-01
## Granulicatella_167                                     5.702487e-01
## Rhodococcus_221                                        4.290413e-01
## Micrococcus_97                                         6.936487e-01
## Acetobacteraceae_230                                   5.242802e-01
## Paracoccus_206                                         5.196391e-01
## Phenylobacterium_286                                   5.208523e-01
## Fimbriiglobus_223                                      5.601154e-01
## Belnapia_rosea_259                                     4.953726e-01
## Escherichia/Shigella_93                                5.998222e-01
## Alloprevotella_219                                     5.573288e-01
## UCG_005_354                                            5.122670e-01
## Cellulomonas_360                                       4.765713e-01
## Abiotrophia_defectiva_181                              5.837844e-01
## Corynebacterium_matruchotii_85                         6.413004e-01
## Klebsiella_245                                         6.368719e-01
## Micrococcaceae_212                                     6.008621e-01
## Halomonas_178                                          6.251617e-01
## Paucibacter_19                                         8.608316e-01
## Streptococcus_195                                      6.201562e-01
## Pseudoxanthomonas_447                                  5.361872e-01
## Limnobacter_thiooxidans_236                            6.162906e-01
## Massilia_111                                           7.537996e-01
## Geodermatophilus_234                                   6.061193e-01
## Porphyromonas_254                                      6.054150e-01
## Streptococcus_69                                       6.774180e-01
## Stenotrophomonas_277                                   6.273878e-01
## Hydrocarboniphaga_389                                  5.327033e-01
## Dietzia_timorensis_339                                 6.388073e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 6.401958e-01
## Clostridium_sensu_stricto_1_293                        6.523254e-01
## Ruminiclostridium_341                                  6.581324e-01
## DSSD61_338                                             6.660294e-01
## Stenotrophomonas_282                                   6.970626e-01
## Haemophilus_133                                        6.754261e-01
## Ellin6055_144                                          7.280898e-01
## Sphingomonas_141                                       8.609837e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 7.217805e-01
## Mesorhizobium_134                                      8.788187e-01
## Frankiales_280                                         7.410998e-01
## Brachybacterium_200                                    8.157206e-01
## Gemella_213                                            8.798242e-01
## Paenarthrobacter_344                                   8.445820e-01
## Sphingomonadaceae_84                                   9.458973e-01
## Acinetobacter_88                                       9.665141e-01
##                                                          adjPvalues
## Tepidimonas_1                                          0.000000e+00
## Curvibacter_2                                          0.000000e+00
## Thermus_5                                              0.000000e+00
## Schlegelella_4                                         0.000000e+00
## Thermus_thermophilus_10                                0.000000e+00
## Caulobacter_6                                          0.000000e+00
## Comamonadaceae_7                                       0.000000e+00
## Methylobacterium_Methylorubrum_13                      9.600603e-10
## Bosea_9                                                0.000000e+00
## Sphingobium_11                                         1.032314e-04
## Sphingomonas_8                                         1.796277e-12
## Azospirillum_15                                        0.000000e+00
## Ottowia_14                                             0.000000e+00
## Brevundimonas_20                                       0.000000e+00
## Meiothermus_silvanus_16                                0.000000e+00
## Methyloversatilis_23                                   0.000000e+00
## Lactococcus_31                                         2.296160e-07
## Bradyrhizobium_24                                      9.870203e-08
## Methylobacterium_Methylorubrum_22                      1.968903e-04
## Methylobacterium_Methylorubrum_26                      1.216987e-03
## Noviherbaspirillum_suwonense_27                        2.233824e-04
## Achromobacter_43                                       1.003759e-09
## Brevundimonas_28                                       1.541360e-08
## Xanthobacter_autotrophicus_29                          3.148812e-07
## Pseudomonas_japonica_45                                1.534194e-03
## Bacteriovorax_stolpii_38                               4.176337e-08
## Thermus_3                                              6.242362e-02
## Delftia_21                                             9.248201e-02
## Aquabacterium_47                                       2.121498e-05
## Microbacteriaceae_71                                   4.217611e-01
## Phenylobacterium_muchangponense_40                     1.655010e-06
## Sphingomonas_koreensis_42                              1.253244e-01
## Rhodopseudomonas_41                                    9.473454e-02
## Sphingopyxis_48                                        3.553149e-05
## Aquabacterium_52                                       1.648292e-03
## Comamonas_25                                           1.935044e-03
## Pseudomonas_86                                         4.898282e-04
## Thiobacillus_thioparus_49                              2.496491e-04
## Proteus_89                                             7.880428e-04
## Brevundimonas_kwangchunensis_65                        1.698183e-01
## Vulcaniibacterium_139                                  2.022844e-03
## Methylobacterium_Methylorubrum_61                      9.680221e-02
## Streptococcus_34                                       3.205142e-01
## Sphingomonas_koreensis_116                             2.806031e-03
## Aquabacterium_parvum_46                                2.864475e-02
## Moraxella_37                                           3.828213e-01
## Brevundimonas_126                                      1.098938e-03
## Anoxybacillus_102                                      1.477738e-01
## Brevundimonas_53                                       4.113286e-02
## Pseudarthrobacter_80                                   2.399682e-01
## Dolosigranulum_pigrum_30                               4.849275e-01
## Pseudomonas_105                                        5.297212e-03
## Meiothermus_58                                         2.174950e-01
## Nitriliruptoraceae_18                                  3.895332e-01
## Blastomonas_131                                        4.138957e-03
## Caulobacter_104                                        2.565866e-01
## Enhydrobacter_70                                       3.474598e-01
## Reyranella_massiliensis_110                            6.369270e-03
## Gammaproteobacteria_226                                7.343853e-03
## Bosea_36                                               3.002453e-01
## Alcaligenes_60                                         1.421556e-02
## Thermus_brockianus_50                                  4.860009e-01
## Candidatus_Paracaedibacter_150                         4.581122e-02
## Neisseria_63                                           4.720887e-01
## Asticcacaulis_excentricus_117                          7.343853e-03
## Limnohabitans_82                                       4.432670e-01
## Cloacibacterium_56                                     6.273100e-01
## Bosea_96                                               4.353587e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  4.720887e-01
## Methylobacterium_Methylorubrum_32                      5.763663e-01
## Psychroglaciecola_87                                   3.893793e-01
## Acinetobacter_79                                       5.211148e-01
## Afipia_72                                              4.570482e-01
## Stenotrophomonas_129                                   6.438610e-01
## Methylopilaceae_176                                    3.614237e-01
## Staphylococcus_17                                      5.890126e-01
## Meiothermus_152                                        4.217611e-01
## Skermanella_aerolata_77                                4.778548e-01
## Sphingobium_81                                         5.211148e-01
## Bdellovibrio_194                                       4.981204e-02
## Methylobacterium_Methylorubrum_91                      5.211148e-01
## Phenylobacterium_mobile_101                            4.779662e-01
## Duganella_166                                          4.432670e-01
## Corynebacterium_59                                     4.849275e-01
## Burkholderia_Caballeronia_Paraburkholderia_55          6.410186e-01
## Halomonas_94                                           5.343656e-01
## Cupriavidus_78                                         2.196589e-01
## Brevundimonas_124                                      2.196589e-01
## Klenkia_140                                            5.162156e-01
## Cupriavidus_gilardii_67                                1.340673e-01
## Ralstonia_66                                           5.966740e-01
## Pseudomonas_145                                        5.205668e-01
## Blastococcus_57                                        5.966740e-01
## Streptococcus_90                                       5.110581e-01
## Brevundimonas_74                                       5.343656e-01
## Bosea_73                                               1.498265e-01
## Bosea_vestrisii_39                                     3.124775e-01
## Sphingoaurantiacus_polygranulatus_168                  5.211148e-01
## Enterobacterales_198                                   5.211148e-01
## Devosia_148                                            2.418709e-01
## Devosia_288                                            4.681849e-01
## Haemophilus_114                                        5.454170e-01
## Corynebacterium_35                                     6.580193e-01
## Sphingobium_137                                        5.199345e-01
## Sphingopyxis_122                                       3.132210e-01
## Rhodopseudomonas_155                                   5.199345e-01
## Anoxybacillus_127                                      5.763663e-01
## Variovorax_paradoxus_103                               5.966740e-01
## Caulobacter_169                                        5.343656e-01
## Neisseria_118                                          5.763663e-01
## Lawsonella_clevelandensis_143                          2.849297e-01
## Haliangium_107                                         1.771929e-01
## Tepidiphilus_succinatimandens_106                      1.823099e-01
## Alphaproteobacteria_187                                2.606615e-01
## Porphyromonas_gingivalis_193                           5.763663e-01
## Frankiales_158                                         5.211148e-01
## Brachymonas_75                                         1.854198e-01
## Pyrinomonas_207                                        1.854198e-01
## Corynebacterium_62                                     7.182068e-01
## Microvirga_189                                         5.890126e-01
## Leifsonia_188                                          5.890126e-01
## Yonghaparkia_123                                       5.966740e-01
## Methylobacterium_Methylorubrum_240                     5.763663e-01
## Haemophilus_54                                         6.281361e-01
## Brevibacillus_208                                      5.523862e-01
## Novosphingobium_159                                    5.966740e-01
## Galbitalea_203                                         5.966740e-01
## Tepidimonas_128                                        2.174950e-01
## Nocardioides_95                                        5.966740e-01
## Sphingosinicella_163                                   3.129496e-01
## Sphingobium_yanoikuyae_120                             3.002453e-01
## Staphylococcus_51                                      6.273100e-01
## Stenotrophomonas_115                                   4.860009e-01
## Fluviicola_76                                          3.301432e-01
## Brevundimonas_135                                      5.966740e-01
## Pedobacter_381                                         5.245210e-01
## Streptococcus_216                                      5.211148e-01
## Devosia_neptuniae_146                                  5.966740e-01
## Acidovorax_218                                         5.966740e-01
## Turicella_otitidis_268                                 5.966740e-01
## Methylobacillus_98                                     3.474598e-01
## Corynebacterium_44                                     6.273100e-01
## Flavihumibacter_165                                    2.606615e-01
## Novispirillum_220                                      2.606615e-01
## Luteimonas_209                                         5.966740e-01
## Rhodopseudomonas_156                                   5.966740e-01
## Streptococcus_303                                      5.966740e-01
## Cnuella_349                                            5.865682e-01
## Patulibacter_minatonensis_217                          5.966740e-01
## PMMR1_132                                              2.849297e-01
## Massilia_214                                           6.170201e-01
## Dietzia_109                                            6.273100e-01
## Methylobacterium_Methylorubrum_246                     5.966740e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199 5.966740e-01
## Prevotella_histicola_247                               5.966740e-01
## Pseudomonas_154                                        5.966740e-01
## Janibacter_147                                         6.171115e-01
## Ralstonia_121                                          5.966740e-01
## Acetitomaculum_362                                     5.966740e-01
## Mesorhizobium_294                                      5.966740e-01
## Acinetobacter_lwoffii_175                              6.410186e-01
## Sphingomonas_367                                       5.966740e-01
## Thermomonas_hydrothermalis_363                         5.966740e-01
## Brevundimonas_149                                      5.966740e-01
## Candidatus_Paracaedibacter_347                         5.966740e-01
## Methylophilus_263                                      5.966740e-01
## Herbiconiux_185                                        6.171115e-01
## Pseudomonas_12                                         5.966740e-01
## Hansschlegelia_242                                     6.171115e-01
## Pseudomonas_33                                         7.574525e-01
## Burkholderia_Caballeronia_Paraburkholderia_374         5.966740e-01
## Ensifer_365                                            5.966740e-01
## Aerococcus_233                                         6.171115e-01
## Burkholderia_Caballeronia_Paraburkholderia_201         6.281361e-01
## Bacillus_83                                            6.705437e-01
## Pseudoxanthomonas_mexicana_289                         6.171115e-01
## Aquabacterium_228                                      6.273100e-01
## Kocuria_299                                            6.171115e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_314 6.171115e-01
## Quadrisphaera_271                                      6.273100e-01
## Prevotella_248                                         6.273100e-01
## Staphylococcus_264                                     6.171115e-01
## Roseomonas_cervicalis_243                              4.217611e-01
## Methylopila_oligotropha_112                            6.715550e-01
## KD4_96_297                                             6.273100e-01
## Actinomyces_119                                        6.273100e-01
## Veillonella_348                                        6.273100e-01
## Caulobacteraceae_92                                    6.580193e-01
## Finegoldia_171                                         6.281361e-01
## Kocuria_330                                            6.273100e-01
## Granulicatella_167                                     6.705437e-01
## Rhodococcus_221                                        6.171115e-01
## Micrococcus_97                                         7.377900e-01
## Acetobacteraceae_230                                   6.438610e-01
## Paracoccus_206                                         6.438610e-01
## Phenylobacterium_286                                   6.438610e-01
## Fimbriiglobus_223                                      6.653147e-01
## Belnapia_rosea_259                                     6.299847e-01
## Escherichia/Shigella_93                                6.918630e-01
## Alloprevotella_219                                     6.653147e-01
## UCG_005_354                                            6.410186e-01
## Cellulomonas_360                                       6.273100e-01
## Abiotrophia_defectiva_181                              6.796295e-01
## Corynebacterium_matruchotii_85                         7.045272e-01
## Klebsiella_245                                         7.045272e-01
## Micrococcaceae_212                                     6.918630e-01
## Halomonas_178                                          7.024342e-01
## Paucibacter_19                                         8.759574e-01
## Streptococcus_195                                      7.010461e-01
## Pseudoxanthomonas_447                                  6.500923e-01
## Limnobacter_thiooxidans_236                            7.000583e-01
## Massilia_111                                           7.804828e-01
## Geodermatophilus_234                                   6.918630e-01
## Porphyromonas_254                                      6.918630e-01
## Streptococcus_69                                       7.238165e-01
## Stenotrophomonas_277                                   7.024342e-01
## Hydrocarboniphaga_389                                  6.492321e-01
## Dietzia_timorensis_339                                 7.045272e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 7.045272e-01
## Clostridium_sensu_stricto_1_293                        7.132903e-01
## Ruminiclostridium_341                                  7.162929e-01
## DSSD61_338                                             7.182068e-01
## Stenotrophomonas_282                                   7.380663e-01
## Haemophilus_133                                        7.238165e-01
## Ellin6055_144                                          7.605938e-01
## Sphingomonas_141                                       8.759574e-01
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 7.574525e-01
## Mesorhizobium_134                                      8.874089e-01
## Frankiales_280                                         7.707438e-01
## Brachybacterium_200                                    8.408749e-01
## Gemella_213                                            8.874089e-01
## Paenarthrobacter_344                                   8.668078e-01
## Sphingomonadaceae_84                                   9.499569e-01
## Acinetobacter_88                                       9.665141e-01

7.2.3 RNA_protect vs Blanks

ps_RB <- subset_samples(ps_filtered, sample_data(ps_filtered)$Sample_type!="stgg")
ps_RB <- prune_taxa(taxa_sums(ps_RB)>0, ps_RB)

metaSeq_RB <- phyloseq_to_metagenomeSeq(ps_RB) # raw sequence count phyloseq
metaSeq_norm_RB <- cumNorm(metaSeq_RB, p=0.5) # internal normalisation
mod3_RB <- model.matrix(~ Sample_type, pData(metaSeq_norm_RB)) # formula
fit_RB <-  fitFeatureModel(metaSeq_norm_RB, mod3_RB) # NOT fitZig; gives higher # false-positives
## Warning: Partial NA coefficients for 85 probe(s)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
VP.df_RB <- MRcoefs(fit_RB, number = Inf, alpha = 1, adjustMethod = "BH") # extract all output (not only significant)
VP.df_RB
##                                                               logFC          se
## Vulcaniibacterium_139                                   2.570735242  0.95683953
## Corynebacterium_35                                      2.533100274  0.99471296
## Cloacibacterium_56                                      2.160506204  0.89104038
## Tepidimonas_1                                          -2.047247042  0.70935560
## Pseudomonas_86                                          1.476049129  0.74792980
## Sphingomonas_8                                         -1.475388140  0.84096913
## Sphingomonas_koreensis_116                              1.440616875  0.83213340
## Blastomonas_131                                         1.358954365  0.97413591
## Thermus_5                                              -1.292086784  0.65654247
## Bosea_36                                               -1.253948071  0.55875457
## Proteus_89                                              1.195858087  0.73415837
## Aquabacterium_47                                        1.132469538  0.64119195
## Methylobacterium_Methylorubrum_13                      -1.099869094  0.58139976
## Pseudomonas_33                                          1.099175100  0.74011255
## Achromobacter_43                                        1.043224544  0.42872007
## Corynebacterium_44                                     -1.022236329  0.56966433
## Moraxella_37                                            0.983610734  0.58156649
## Meiothermus_58                                          0.966409749  0.84902146
## Pseudomonas_105                                         0.965392715  0.86106042
## Brevundimonas_126                                       0.849255490  0.68301594
## Reyranella_massiliensis_110                             0.812554451  0.76088015
## Noviherbaspirillum_suwonense_27                        -0.809465524  0.54024159
## Microbacteriaceae_71                                    0.737236364  0.28002704
## Dolosigranulum_pigrum_30                                0.662970717  0.47871877
## Bdellovibrio_194                                        0.651310675  0.95736194
## Bradyrhizobium_24                                      -0.607967852  0.59361609
## Stenotrophomonas_129                                    0.605025788  0.20241669
## Brevundimonas_28                                        0.604451186  0.49716432
## Corynebacterium_62                                      0.591287197  0.96142829
## Delftia_21                                             -0.589139340  0.70494447
## Asticcacaulis_excentricus_117                           0.563265221  0.75652974
## Methylobacterium_Methylorubrum_22                      -0.562203141  0.47302851
## Bosea_vestrisii_39                                     -0.553529644  0.44139091
## Streptococcus_69                                       -0.545232316  0.43514067
## Methylobacterium_Methylorubrum_61                      -0.538511974  0.45122908
## Meiothermus_silvanus_16                                -0.530428847  0.37491405
## Aquabacterium_52                                        0.508952974  0.55216906
## Gammaproteobacteria_226                                 0.507931676  0.19540666
## Nitriliruptoraceae_18                                  -0.499478159  0.40425203
## Mesorhizobium_134                                       0.495340748  0.32796244
## Brevundimonas_53                                        0.488851820  0.86180619
## Candidatus_Paracaedibacter_150                          0.457160134  0.24791782
## Brevundimonas_74                                       -0.425118341  0.38535126
## Phenylobacterium_muchangponense_40                     -0.409096622  0.47087752
## Afipia_72                                              -0.403953587  0.38097790
## Sphingopyxis_48                                         0.398849662  0.63061103
## Thermus_3                                               0.389735906  0.43169474
## Corynebacterium_59                                      0.382175783  0.33311679
## Rhodopseudomonas_41                                    -0.370486175  0.42267281
## Methylobacterium_Methylorubrum_26                      -0.345837857  0.40028498
## Sphingomonas_koreensis_42                               0.344924844  0.49035599
## Fluviicola_76                                          -0.324801580  0.34446796
## Staphylococcus_51                                      -0.315812318  0.29042345
## Cupriavidus_gilardii_67                                -0.313470358  0.38718041
## Klebsiella_245                                          0.309689380  0.16619129
## Bosea_73                                               -0.305870175  0.37967554
## Bacteriovorax_stolpii_38                                0.302912790  0.49068563
## Thermus_thermophilus_10                                -0.302145242  0.33955132
## Pseudomonas_japonica_45                                -0.294796514  0.34525318
## Acinetobacter_100                                      -0.293395564  0.26243339
## Mesorhizobium_294                                       0.289473876  0.15771731
## Granulicatella_167                                      0.283287296  0.15562541
## Streptococcus_216                                       0.271791669  0.15067036
## Sphingomonas_141                                        0.270617673  0.25293230
## Curvibacter_2                                           0.263927038  0.28729146
## Enhydrobacter_70                                       -0.259141996  0.27262810
## Paucibacter_151                                        -0.258117705  0.36986267
## Burkholderia_Caballeronia_Paraburkholderia_55          -0.257078430  0.90715734
## Acinetobacter_88                                        0.255230757  0.16763518
## Methylobacillus_98                                     -0.254805742  0.29933217
## Phreatobacter_oligotrophus_186                         -0.246527244  0.22425458
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 -0.244821654  0.35371944
## Brevundimonas_124                                       0.243965034  0.26817978
## Providencia_130                                        -0.239230282  0.20447824
## Tepidiphilus_232                                       -0.234211207  0.23372858
## Streptococcus_90                                       -0.228754002  0.33494323
## Sphingomonas_184                                       -0.226227282  0.29347041
## Escherichia/Shigella_93                                -0.219930468  0.29085409
## Methylobacterium_Methylorubrum_32                      -0.217870065  0.46389921
## Brevundimonas_149                                      -0.214028122  0.31242640
## Legionella_lytica_244                                  -0.209614101  0.20372389
## Gemella_213                                             0.208395177  0.12019528
## Sphingobium_137                                        -0.204559936  0.29747780
## Nocardioides_95                                        -0.204223758  0.32096142
## Brachymonas_75                                         -0.203802910  0.36044350
## Ottowia_14                                              0.203379661  0.36529680
## PMMR1_132                                              -0.202409584  0.32236495
## Pseudomonas_12                                          0.202216003  0.35089621
## Caulobacteraceae_182                                   -0.193845002  0.21431279
## Psychroglaciecola_87                                   -0.192724220  0.27679652
## Phenylobacterium_mobile_101                            -0.192476372  0.26413608
## Novosphingobium_311                                    -0.190127073  0.27181239
## Alphaproteobacteria_187                                 0.189697255  0.21886759
## Haliangium_107                                         -0.188457519  0.27427449
## Pseudomonas_154                                        -0.185979026  0.25829496
## Sphingobium_205                                        -0.185482084  0.21998457
## Haemophilus_114                                        -0.184304328  0.25099241
## Lawsonella_clevelandensis_143                           0.182002073  0.34600320
## Sphingomonadaceae_84                                   -0.179476675  0.31554721
## Caulobacter_272                                        -0.175912211  0.22510384
## Hydrocarboniphaga_389                                  -0.174337448  0.27160628
## Neisseria_118                                          -0.168519849  0.22516149
## Bosea_211                                              -0.168169011  0.17812175
## Comamonas_25                                           -0.165043243  0.58591175
## Stenotrophomonas_282                                   -0.164361962  0.25061295
## Caulobacter_104                                        -0.163776256  0.26031128
## Xanthobacter_autotrophicus_29                           0.162328103  0.38927360
## Haemophilus_133                                        -0.161205895  0.34004014
## Brevundimonas_20                                       -0.160987929  0.37312335
## Vulcaniibacterium_thermophilum_321                     -0.159446069  0.20402620
## Bosea_231                                              -0.155879197  0.16678773
## Azospirillum_15                                        -0.154160437 94.57880746
## Paracoccus_206                                          0.153529506  0.19230092
## Methylobacterium_Methylorubrum_265                     -0.148195184  0.17742308
## Caulobacter_6                                           0.139905896  0.35308656
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  -0.135189111  0.38432997
## Frankiales_158                                         -0.132841731  0.15620037
## Methyloversatilis_23                                    0.132794320  0.35718296
## Ralstonia_121                                           0.128741595  0.27956849
## Finegoldia_171                                         -0.127686077  0.26527801
## Blastococcus_57                                         0.126636576  0.27211780
## Ellin6055_144                                          -0.126199237  0.20800389
## Halomonas_94                                           -0.125939782  0.28515468
## Massilia_111                                            0.121327354  0.28521509
## Brevundimonas_135                                      -0.116224895  0.24205879
## Belnapia_rosea_259                                     -0.113646447  0.25727733
## Limnohabitans_82                                       -0.111556675  0.22601436
## Aquabacterium_parvum_46                                -0.110292978  0.63796998
## Rhodopseudomonas_155                                   -0.108540165  0.23499590
## Tepidimonas_128                                        -0.108123542  0.27044754
## Acinetobacter_lwoffii_175                               0.106422112  0.17296915
## Anoxybacillus_127                                      -0.103541340  0.20513367
## Streptococcus_195                                      -0.103314974  0.20428978
## Bacillus_83                                            -0.101985423  0.23303214
## Dietzia_109                                            -0.100481531  0.17632700
## Sphingopyxis_122                                        0.097905370  0.30242817
## Novosphingobium_159                                    -0.096412303  0.23176276
## Staphylococcus_17                                      -0.095335144  0.41451792
## Acinetobacter_79                                        0.095063419  0.21462222
## DSSD61_338                                             -0.094113427  0.18883199
## Micrococcaceae_212                                     -0.093774730  0.17371620
## Ruminiclostridium_341                                  -0.093570141  0.19354444
## Pyrinomonas_207                                         0.091067442  0.20187033
## Bosea_9                                                 0.090635593  0.33623530
## Clostridium_sensu_stricto_1_293                        -0.090386685  0.18244950
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 -0.090386685  0.18244950
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199 -0.089356058  0.20707362
## Duganella_166                                          -0.086512957  0.21035572
## Cellulomonas_360                                       -0.086266415  0.17544035
## Devosia_148                                             0.084820589  0.31825309
## Comamonadaceae_7                                       -0.084542940  0.36607868
## Paenarthrobacter_344                                   -0.082326352  0.18918911
## Acetobacteraceae_230                                   -0.081659589  0.16766976
## Limnobacter_thiooxidans_236                            -0.080659830  0.16467114
## Dietzia_timorensis_339                                 -0.080659830  0.16467114
## Micrococcus_97                                          0.079918633  0.30160159
## Thiobacillus_thioparus_49                               0.079460831  0.57088962
## Stenotrophomonas_115                                    0.078796843  0.24521755
## Staphylococcus_264                                     -0.074181535  0.12865680
## Rhodococcus_221                                         0.074091858  0.22725629
## Flavihumibacter_165                                     0.073880782  0.19911192
## Rhodopseudomonas_156                                   -0.073840920  0.15894649
## Frankiales_280                                         -0.073468631  0.13437144
## Halomonas_178                                          -0.067957831  0.12131175
## Geodermatophilus_234                                   -0.067957831  0.12131175
## Sphingobium_yanoikuyae_120                             -0.064211960  0.29117476
## Skermanella_aerolata_77                                -0.063266326  0.13757244
## Tepidiphilus_succinatimandens_106                      -0.063018190  0.29706660
## Ralstonia_66                                            0.059779392  0.39084078
## Schlegelella_4                                         -0.059022596  0.31664331
## Sphingosinicella_163                                    0.055361490  0.30649679
## Stenotrophomonas_277                                   -0.052432948  0.10410270
## Alcaligenes_60                                         -0.048596557  0.71993516
## Novispirillum_220                                       0.039197227  0.20603260
## Brachybacterium_200                                     0.036454602  0.30901775
## Roseomonas_cervicalis_243                              -0.031388889  0.19795852
## Actinomyces_119                                        -0.031347062  0.27786910
## Alloprevotella_219                                     -0.029445895  0.08325272
## Cupriavidus_78                                          0.029089505  0.38797471
## Streptococcus_34                                        0.027839756  0.37939224
## Paucibacter_19                                         -0.020290988  0.33424461
## Sphingobium_11                                          0.008623674 94.57869486
## Caulobacteraceae_92                                     0.004610335  0.29915165
##                                                            pvalues adjPvalues
## Vulcaniibacterium_139                                  0.007216298  0.3318072
## Corynebacterium_35                                     0.010878925  0.3318072
## Cloacibacterium_56                                     0.015321013  0.3504682
## Tepidimonas_1                                          0.003900904  0.3318072
## Pseudomonas_86                                         0.048437153  0.6938212
## Sphingomonas_8                                         0.079363642  0.6938212
## Sphingomonas_koreensis_116                             0.083410200  0.6938212
## Blastomonas_131                                        0.163005075  0.8362421
## Thermus_5                                              0.049066075  0.6938212
## Bosea_36                                               0.024820564  0.5046848
## Proteus_89                                             0.103337790  0.7879506
## Aquabacterium_47                                       0.077363266  0.6938212
## Methylobacterium_Methylorubrum_13                      0.058522900  0.6938212
## Pseudomonas_33                                         0.137505184  0.8362421
## Achromobacter_43                                       0.014959971  0.3504682
## Corynebacterium_44                                     0.072740765  0.6938212
## Moraxella_37                                           0.090777114  0.7222701
## Meiothermus_58                                         0.255010664  0.8362421
## Pseudomonas_105                                        0.262216690  0.8362421
## Brevundimonas_126                                      0.213723991  0.8362421
## Reyranella_massiliensis_110                            0.285559377  0.8362421
## Noviherbaspirillum_suwonense_27                        0.134044967  0.8362421
## Microbacteriaceae_71                                   0.008470097  0.3318072
## Dolosigranulum_pigrum_30                               0.166087460  0.8362421
## Bdellovibrio_194                                       0.496303053  0.8362421
## Bradyrhizobium_24                                      0.305751755  0.8362421
## Stenotrophomonas_129                                   0.002798817  0.3318072
## Brevundimonas_28                                       0.224062033  0.8362421
## Corynebacterium_62                                     0.538548677  0.8362421
## Delftia_21                                             0.403309928  0.8362421
## Asticcacaulis_excentricus_117                          0.456550997  0.8362421
## Methylobacterium_Methylorubrum_22                      0.234629195  0.8362421
## Bosea_vestrisii_39                                     0.209821052  0.8362421
## Streptococcus_69                                       0.210204825  0.8362421
## Methylobacterium_Methylorubrum_61                      0.232699575  0.8362421
## Meiothermus_silvanus_16                                0.157126790  0.8362421
## Aquabacterium_52                                       0.356667362  0.8362421
## Gammaproteobacteria_226                                0.009339858  0.3318072
## Nitriliruptoraceae_18                                  0.216621687  0.8362421
## Mesorhizobium_134                                      0.130952056  0.8362421
## Brevundimonas_53                                       0.570550443  0.8362421
## Candidatus_Paracaedibacter_150                         0.065183330  0.6938212
## Brevundimonas_74                                       0.269941644  0.8362421
## Phenylobacterium_muchangponense_40                     0.384958590  0.8362421
## Afipia_72                                              0.289004896  0.8362421
## Sphingopyxis_48                                        0.527072449  0.8362421
## Thermus_3                                              0.366629720  0.8362421
## Corynebacterium_59                                     0.251268955  0.8362421
## Rhodopseudomonas_41                                    0.380740980  0.8362421
## Methylobacterium_Methylorubrum_26                      0.387599369  0.8362421
## Sphingomonas_koreensis_42                              0.481795784  0.8362421
## Fluviicola_76                                          0.345727981  0.8362421
## Staphylococcus_51                                      0.276851165  0.8362421
## Cupriavidus_gilardii_67                                0.418156593  0.8362421
## Klebsiella_245                                         0.062398792  0.6938212
## Bosea_73                                               0.420468117  0.8362421
## Bacteriovorax_stolpii_38                               0.537019998  0.8362421
## Thermus_thermophilus_10                                0.373553545  0.8362421
## Pseudomonas_japonica_45                                0.393184759  0.8362421
## Acinetobacter_100                                      0.263575084  0.8362421
## Mesorhizobium_294                                      0.066446888  0.6938212
## Granulicatella_167                                     0.068711030  0.6938212
## Streptococcus_216                                      0.071249684  0.6938212
## Sphingomonas_141                                       0.284654709  0.8362421
## Curvibacter_2                                          0.358266406  0.8362421
## Enhydrobacter_70                                       0.341841509  0.8362421
## Paucibacter_151                                        0.485255721  0.8362421
## Burkholderia_Caballeronia_Paraburkholderia_55          0.776878643  0.8880824
## Acinetobacter_88                                       0.127874583  0.8362421
## Methylobacillus_98                                     0.394631917  0.8362421
## Phreatobacter_oligotrophus_186                         0.271629089  0.8362421
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_153 0.488852460  0.8362421
## Brevundimonas_124                                      0.362977022  0.8362421
## Providencia_130                                        0.242019180  0.8362421
## Tepidiphilus_232                                       0.316312248  0.8362421
## Streptococcus_90                                       0.494629901  0.8362421
## Sphingomonas_184                                       0.440784497  0.8362421
## Escherichia/Shigella_93                                0.449556909  0.8362421
## Methylobacterium_Methylorubrum_32                      0.638605399  0.8362421
## Brevundimonas_149                                      0.493311528  0.8362421
## Legionella_lytica_244                                  0.303520688  0.8362421
## Gemella_213                                            0.082952689  0.6938212
## Sphingobium_137                                        0.491674641  0.8362421
## Nocardioides_95                                        0.524589019  0.8362421
## Brachymonas_75                                         0.571786339  0.8362421
## Ottowia_14                                             0.577697005  0.8362421
## PMMR1_132                                              0.530076291  0.8362421
## Pseudomonas_12                                         0.564422986  0.8362421
## Caulobacteraceae_182                                   0.365732610  0.8362421
## Psychroglaciecola_87                                   0.486261777  0.8362421
## Phenylobacterium_mobile_101                            0.466184237  0.8362421
## Novosphingobium_311                                    0.484252693  0.8362421
## Alphaproteobacteria_187                                0.386094601  0.8362421
## Haliangium_107                                         0.492011626  0.8362421
## Pseudomonas_154                                        0.471509142  0.8362421
## Sphingobium_205                                        0.399139231  0.8362421
## Haemophilus_114                                        0.462764462  0.8362421
## Lawsonella_clevelandensis_143                          0.598879397  0.8362421
## Sphingomonadaceae_84                                   0.569506019  0.8362421
## Caulobacter_272                                        0.434525295  0.8362421
## Hydrocarboniphaga_389                                  0.520953942  0.8362421
## Neisseria_118                                          0.454194852  0.8362421
## Bosea_211                                              0.345106320  0.8362421
## Comamonas_25                                           0.778184151  0.8880824
## Stenotrophomonas_282                                   0.511927174  0.8362421
## Caulobacter_104                                        0.529247298  0.8362421
## Xanthobacter_autotrophicus_29                          0.676676507  0.8362421
## Haemophilus_133                                        0.635443559  0.8362421
## Brevundimonas_20                                       0.666133678  0.8362421
## Vulcaniibacterium_thermophilum_321                     0.434509644  0.8362421
## Bosea_231                                              0.349996367  0.8362421
## Azospirillum_15                                        0.998699474  0.9999272
## Paracoccus_206                                         0.424649110  0.8362421
## Methylobacterium_Methylorubrum_265                     0.403568850  0.8362421
## Caulobacter_6                                          0.691930326  0.8385646
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  0.725023726  0.8559958
## Frankiales_158                                         0.395070941  0.8362421
## Methyloversatilis_23                                   0.710054904  0.8499323
## Ralstonia_121                                          0.645156585  0.8362421
## Finegoldia_171                                         0.630282483  0.8362421
## Blastococcus_57                                        0.641663583  0.8362421
## Ellin6055_144                                          0.544039575  0.8362421
## Halomonas_94                                           0.658739405  0.8362421
## Massilia_111                                           0.670553146  0.8362421
## Brevundimonas_135                                      0.631119662  0.8362421
## Belnapia_rosea_259                                     0.658686475  0.8362421
## Limnohabitans_82                                       0.621601248  0.8362421
## Aquabacterium_parvum_46                                0.862744857  0.9232884
## Rhodopseudomonas_155                                   0.644166582  0.8362421
## Tepidimonas_128                                        0.689307602  0.8385646
## Acinetobacter_lwoffii_175                              0.538378791  0.8362421
## Anoxybacillus_127                                      0.613734020  0.8362421
## Streptococcus_195                                      0.613047904  0.8362421
## Bacillus_83                                            0.661643415  0.8362421
## Dietzia_109                                            0.568773315  0.8362421
## Sphingopyxis_122                                       0.746141708  0.8663046
## Novosphingobium_159                                    0.677413180  0.8362421
## Staphylococcus_17                                      0.818099227  0.9073464
## Acinetobacter_79                                       0.657813673  0.8362421
## DSSD61_338                                             0.618203773  0.8362421
## Micrococcaceae_212                                     0.589324158  0.8362421
## Ruminiclostridium_341                                  0.628772284  0.8362421
## Pyrinomonas_207                                        0.651904132  0.8362421
## Bosea_9                                                0.787498762  0.8880824
## Clostridium_sensu_stricto_1_293                        0.620313144  0.8362421
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_343 0.620313144  0.8362421
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_199 0.666091542  0.8362421
## Duganella_166                                          0.680874705  0.8362421
## Cellulomonas_360                                       0.622921791  0.8362421
## Devosia_148                                            0.789839298  0.8880824
## Comamonadaceae_7                                       0.817359865  0.9073464
## Paenarthrobacter_344                                   0.663450823  0.8362421
## Acetobacteraceae_230                                   0.626239675  0.8362421
## Limnobacter_thiooxidans_236                            0.624258649  0.8362421
## Dietzia_timorensis_339                                 0.624258649  0.8362421
## Micrococcus_97                                         0.791024248  0.8880824
## Thiobacillus_thioparus_49                              0.889301804  0.9353002
## Stenotrophomonas_115                                   0.747956958  0.8663046
## Staphylococcus_264                                     0.564220078  0.8362421
## Rhodococcus_221                                        0.744403356  0.8663046
## Flavihumibacter_165                                    0.710599151  0.8499323
## Rhodopseudomonas_156                                   0.642243254  0.8362421
## Frankiales_280                                         0.584545158  0.8362421
## Halomonas_178                                          0.575348705  0.8362421
## Geodermatophilus_234                                   0.575348705  0.8362421
## Sphingobium_yanoikuyae_120                             0.825460576  0.9099957
## Skermanella_aerolata_77                                0.645604892  0.8362421
## Tepidiphilus_succinatimandens_106                      0.832001806  0.9117146
## Ralstonia_66                                           0.878437112  0.9292138
## Schlegelella_4                                         0.852130391  0.9221700
## Sphingosinicella_163                                   0.856660632  0.9221700
## Stenotrophomonas_277                                   0.614496400  0.8362421
## Alcaligenes_60                                         0.946182630  0.9673264
## Novispirillum_220                                      0.849115043  0.9221700
## Brachybacterium_200                                    0.906091998  0.9463797
## Roseomonas_cervicalis_243                              0.874013210  0.9292138
## Actinomyces_119                                        0.910179340  0.9463797
## Alloprevotella_219                                     0.723569053  0.8559958
## Cupriavidus_78                                         0.940232345  0.9673264
## Streptococcus_34                                       0.941503831  0.9673264
## Paucibacter_19                                         0.951592555  0.9674524
## Sphingobium_11                                         0.999927249  0.9999272
## Caulobacteraceae_92                                    0.987703998  0.9986179

Differential abundance testing was instead preformed independently for each miseq run ### Run 514

metaSeq514 <- phyloseq_to_metagenomeSeq(ps_filtered514) # raw sequence count phyloseq
metaSeq514 <- filterData(metaSeq514, present = 5, depth = 2)
metaSeq_norm514 <- cumNorm(metaSeq514, p=0.5) # internal normalisation
mod514 <- model.matrix(~ Sample_type, pData(metaSeq_norm514)) # formula
fit514 <-  fitFeatureModel(metaSeq_norm514, mod514) # NOT fitZig; gives higher # false-positives
## Warning: Partial NA coefficients for 9 probe(s)
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
VP.df_514 <- MRcoefs(fit514, number = Inf, alpha = 1, adjustMethod = "BH") # extract all output (not only significant)
VP.df_514
##                                                              logFC        se
## Brevundimonas_149                                     -2.887065034 0.8923296
## Corynebacterium_44                                    -2.652899500 0.9129370
## Moraxella_37                                          -2.458623682 0.9275957
## Pseudomonas_154                                       -2.320365106 0.7588196
## Lactococcus_31                                         2.231038309 0.4736054
## Thermus_thermophilus_10                                1.976475589 0.6293105
## Tepidimonas_1                                          1.875505065 0.7644720
## Pseudomonas_33                                         1.752112343 0.9040540
## Bosea_36                                              -1.600351562 0.7181944
## Sphingobium_137                                       -1.510598036 1.1485324
## Afipia_72                                             -1.472259699 0.7589254
## Thermus_5                                              1.357867536 0.6867630
## Phenylobacterium_mobile_101                           -1.280082745 0.8877307
## Brevundimonas_kwangchunensis_65                        1.274222277 0.5325175
## Staphylococcus_17                                     -1.250155329 0.5586200
## Burkholderia_Caballeronia_Paraburkholderia_55         -1.246685957 0.7170069
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64 -1.221548457 0.6693315
## Sphingomonas_8                                        -1.197001959 0.4291661
## Methylobacterium_Methylorubrum_61                     -1.196808093 0.5747841
## Methylobacterium_Methylorubrum_32                     -1.123053815 0.6731775
## Paucibacter_19                                        -1.033531026 0.6262404
## Dolosigranulum_pigrum_30                              -1.030282440 1.0591319
## Rhodopseudomonas_41                                   -0.942510214 0.7241649
## Delftia_21                                            -0.915540872 0.7117670
## Brevundimonas_74                                      -0.850069118 1.2252836
## Psychroglaciecola_87                                  -0.831011119 0.9560489
## Streptococcus_34                                       0.807254961 0.6340360
## Anoxybacillus_102                                      0.804734599 0.4503955
## Pseudarthrobacter_80                                   0.787997462 0.4764445
## Caulobacter_104                                        0.763376905 1.0694438
## Acinetobacter_79                                       0.753685705 0.4933171
## Methylopilaceae_176                                    0.672438393 0.4244378
## Neisseria_63                                           0.622767289 0.5087860
## Thermus_3                                              0.573971390 0.6114840
## Methylobacterium_Methylorubrum_13                      0.530297064 0.3762302
## Nocardioides_95                                       -0.507305004 1.3046422
## Methylobacterium_Methylorubrum_26                      0.502426270 0.8474632
## Bosea_96                                               0.470786619 0.4659718
## Duganella_166                                          0.465591503 0.4596924
## Acinetobacter_lwoffii_175                              0.449789688 0.4363817
## Skermanella_aerolata_77                                0.440128916 0.4603260
## Massilia_111                                           0.429513104 0.4751838
## Thermus_brockianus_50                                  0.406061325 0.5451662
## Noviherbaspirillum_suwonense_27                       -0.390267675 0.4170381
## Corynebacterium_35                                     0.362894762 0.6423301
## Cloacibacterium_56                                     0.352771071 0.4923347
## Pseudomonas_12                                         0.350303924 0.3352417
## Enhydrobacter_70                                       0.330803305 0.5219021
## Blastococcus_57                                        0.293083465 0.5359095
## Bradyrhizobium_24                                      0.278440577 0.5499671
## Sphingomonas_koreensis_42                             -0.268381749 0.4291382
## Escherichia/Shigella_93                                0.230822828 0.4271349
## Methylobacterium_Methylorubrum_22                      0.183355853 0.4372586
## Ralstonia_66                                           0.139274234 1.1171454
## Rhodopseudomonas_155                                   0.131521547 0.4565683
## Nitriliruptoraceae_18                                  0.125022071 0.5611269
## Streptococcus_90                                      -0.085094695 0.4960893
## Haemophilus_114                                       -0.065618167 0.4474498
## Corynebacterium_62                                     0.055044801 0.9611847
## Pseudomonas_japonica_45                               -0.046402468 0.6578395
## Halomonas_94                                           0.031696015 1.1879194
## Micrococcus_97                                        -0.006514552 0.4698287
##                                                            pvalues   adjPvalues
## Brevundimonas_149                                     1.214621e-03 0.0345530232
## Corynebacterium_44                                    3.662036e-03 0.0454092518
## Moraxella_37                                          8.036470e-03 0.0711801585
## Pseudomonas_154                                       2.229227e-03 0.0345530232
## Lactococcus_31                                        2.468027e-06 0.0001530177
## Thermus_thermophilus_10                               1.685446e-03 0.0345530232
## Tepidimonas_1                                         1.415390e-02 0.1096926883
## Pseudomonas_33                                        5.261571e-02 0.2174782868
## Bosea_36                                              2.586061e-02 0.1457597808
## Sphingobium_137                                       1.884286e-01 0.4338865302
## Afipia_72                                             5.238860e-02 0.2174782868
## Thermus_5                                             4.801906e-02 0.2174782868
## Phenylobacterium_mobile_101                           1.493103e-01 0.3857182126
## Brevundimonas_kwangchunensis_65                       1.671911e-02 0.1151761202
## Staphylococcus_17                                     2.522527e-02 0.1457597808
## Burkholderia_Caballeronia_Paraburkholderia_55         8.208114e-02 0.2827239250
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64 6.799686e-02 0.2634878337
## Sphingomonas_8                                        5.284911e-03 0.0546107460
## Methylobacterium_Methylorubrum_61                     3.732539e-02 0.1928478286
## Methylobacterium_Methylorubrum_32                     9.525863e-02 0.2918912444
## Paucibacter_19                                        9.886639e-02 0.2918912444
## Dolosigranulum_pigrum_30                              3.306720e-01 0.5700280019
## Rhodopseudomonas_41                                   1.930829e-01 0.4338865302
## Delftia_21                                            1.983408e-01 0.4338865302
## Brevundimonas_74                                      4.878244e-01 0.6873888630
## Psychroglaciecola_87                                  3.847301e-01 0.5963315892
## Streptococcus_34                                      2.029469e-01 0.4338865302
## Anoxybacillus_102                                     7.398132e-02 0.2698142396
## Pseudarthrobacter_80                                  9.814529e-02 0.2918912444
## Caulobacter_104                                       4.753463e-01 0.6853830187
## Acinetobacter_79                                      1.265643e-01 0.3411733001
## Methylopilaceae_176                                   1.131246e-01 0.3188057190
## Neisseria_63                                          2.209425e-01 0.4566144236
## Thermus_3                                             3.479088e-01 0.5700280019
## Methylobacterium_Methylorubrum_13                     1.586869e-01 0.3935433931
## Nocardioides_95                                       6.973900e-01 0.8158147238
## Methylobacterium_Methylorubrum_26                     5.532755e-01 0.7298527527
## Bosea_96                                              3.123359e-01 0.5695536810
## Duganella_166                                         3.111401e-01 0.5695536810
## Acinetobacter_lwoffii_175                             3.026696e-01 0.5695536810
## Skermanella_aerolata_77                               3.390094e-01 0.5700280019
## Massilia_111                                          3.660546e-01 0.5819329338
## Thermus_brockianus_50                                 4.563688e-01 0.6853830187
## Noviherbaspirillum_suwonense_27                       3.493720e-01 0.5700280019
## Corynebacterium_35                                    5.720968e-01 0.7302640407
## Cloacibacterium_56                                    4.736660e-01 0.6853830187
## Pseudomonas_12                                        2.960556e-01 0.5695536810
## Enhydrobacter_70                                      5.261841e-01 0.7166532760
## Blastococcus_57                                       5.844544e-01 0.7302640407
## Bradyrhizobium_24                                     6.126560e-01 0.7447974708
## Sphingomonas_koreensis_42                             5.317105e-01 0.7166532760
## Escherichia/Shigella_93                               5.889226e-01 0.7302640407
## Methylobacterium_Methylorubrum_22                     6.749747e-01 0.8047774842
## Ralstonia_66                                          9.007850e-01 0.9629081093
## Rhodopseudomonas_155                                  7.732967e-01 0.8878591414
## Nitriliruptoraceae_18                                 8.236870e-01 0.9285199014
## Streptococcus_90                                      8.638063e-01 0.9563569205
## Haemophilus_114                                       8.834089e-01 0.9609009183
## Corynebacterium_62                                    9.543320e-01 0.9861430441
## Pseudomonas_japonica_45                               9.437657e-01 0.9861430441
## Halomonas_94                                          9.787134e-01 0.9889370439
## Micrococcus_97                                        9.889370e-01 0.9889370439
print(xtable((head(MRcoefs(fit514))), digits = 4, type = "latex"), file = "DAT_514.tex")

7.2.4 Run 523

metaSeq523 <- phyloseq_to_metagenomeSeq(ps_filtered523) # raw sequence count phyloseq
metaSeq514 <- filterData(metaSeq514, present = 5, depth = 1)
metaSeq_norm523 <- cumNorm(metaSeq523, p=0.5) # internal normalisation
mod523 <- model.matrix(~ Sample_type, pData(metaSeq_norm523)) # formula
fit523 <-  fitFeatureModel(metaSeq_norm523, mod523) # NOT fitZig; gives higher # false-positives
## Warning: Partial NA coefficients for 54 probe(s)
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred

## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
VP.df_523 <- MRcoefs(fit523, number = Inf, alpha = 1, adjustMethod = "BH") # extract all output (not only significant)
VP.df_523
##                                                             logFC        se
## Cloacibacterium_56                                     2.78494211 0.8598828
## Vulcaniibacterium_139                                  2.22467997 0.9433707
## Corynebacterium_35                                     1.64192849 0.5296951
## Moraxella_37                                           1.62900941 0.5557890
## Pseudomonas_86                                         1.30417727 0.7416231
## Blastomonas_131                                        1.17118991 0.9929321
## Microbacteriaceae_71                                   1.12492259 0.4413106
## Aquabacterium_47                                       1.00460681 0.6406654
## Dolosigranulum_pigrum_30                               0.99152671 0.4597552
## Pseudomonas_33                                         0.98863103 0.7820414
## Meiothermus_silvanus_16                               -0.97556696 0.5917932
## Sphingomonas_koreensis_116                             0.91543848 0.8394389
## Corynebacterium_62                                     0.89713131 0.3488546
## Burkholderia_Caballeronia_Paraburkholderia_55          0.85536742 0.3525797
## Stenotrophomonas_129                                   0.83216311 0.3513700
## Bosea_vestrisii_39                                    -0.80212122 0.6363700
## Bosea_36                                              -0.79777386 0.5559096
## Gammaproteobacteria_226                                0.76009597 0.3390865
## Proteus_89                                             0.74875518 0.7483807
## Pseudomonas_105                                        0.73935830 0.8852611
## Bosea_73                                              -0.72982836 0.5961619
## Reyranella_massiliensis_110                            0.69461685 0.7600670
## Corynebacterium_44                                    -0.66751261 0.4339151
## Candidatus_Paracaedibacter_150                         0.66531702 0.4176313
## Fluviicola_76                                         -0.65962805 0.5468466
## Phenylobacterium_muchangponense_40                    -0.64080727 0.4453454
## Corynebacterium_59                                     0.63597252 0.5250761
## Cupriavidus_gilardii_67                               -0.62599755 0.6044158
## PMMR1_132                                             -0.61130334 0.5208479
## Brevundimonas_20                                      -0.60038947 0.5910282
## Azospirillum_15                                       -0.59212002 0.5822626
## Staphylococcus_51                                     -0.58437275 0.4772654
## Achromobacter_43                                       0.57761833 0.3956690
## Thermus_3                                             -0.56610483 0.5772128
## Methylobacillus_98                                    -0.54238799 0.4871900
## Tepidiphilus_232                                      -0.52474126 0.3947589
## Comamonadaceae_7                                      -0.52090284 0.5880446
## Schlegelella_4                                        -0.47861219 0.5683276
## Caulobacter_272                                       -0.44567287 0.3789973
## Ralstonia_121                                          0.44054126 0.2612686
## Lawsonella_clevelandensis_143                          0.42777156 0.3100431
## Streptococcus_69                                      -0.42557051 0.4119235
## Phreatobacter_oligotrophus_186                        -0.41902901 0.3856727
## Sphingobium_11                                        -0.41816359 0.5703861
## Brevundimonas_126                                      0.41770570 0.6957438
## Brevundimonas_74                                      -0.41572191 0.4268358
## Asticcacaulis_excentricus_117                          0.41548064 0.7735011
## Legionella_lytica_244                                 -0.41423244 0.3558605
## Brevundimonas_28                                       0.41228079 0.4568274
## Ralstonia_66                                           0.40510627 0.3228902
## Brachymonas_75                                        -0.40363821 0.5805732
## Klebsiella_245                                         0.40354059 0.2971795
## Granulicatella_167                                     0.40289010 0.2811596
## Vulcaniibacterium_thermophilum_321                    -0.40205319 0.3510024
## Paucibacter_19                                         0.39172763 0.5949340
## Mesorhizobium_294                                      0.38977467 0.2850835
## Methylobacterium_Methylorubrum_13                     -0.38851210 0.3870278
## Streptococcus_216                                      0.38846889 0.2743400
## Aquabacterium_52                                       0.38724387 0.5343417
## Brevundimonas_124                                      0.38045110 0.4431169
## Curvibacter_2                                         -0.37351655 0.5745202
## Caulobacter_6                                         -0.37083362 0.5782050
## Acinetobacter_100                                     -0.35596277 0.4303058
## Sphingomonadaceae_84                                  -0.35581095 0.5192413
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64  0.35433873 0.2303195
## Bosea_9                                               -0.35081976 0.5701964
## Sphingomonas_141                                       0.32116634 0.3174369
## Massilia_111                                           0.32026232 0.3353061
## Alphaproteobacteria_187                                0.31716053 0.3753429
## Mesorhizobium_134                                      0.31208338 0.4043428
## DSSD61_338                                            -0.30629551 0.3203542
## Acinetobacter_88                                       0.30450942 0.3049596
## Haliangium_107                                        -0.30418302 0.4436905
## Methyloversatilis_23                                  -0.29898092 0.5843372
## Sphingosinicella_163                                  -0.28026921 0.4944818
## Blastococcus_57                                        0.27729132 0.3232521
## Comamonas_25                                          -0.26871599 0.6167498
## Methylobacterium_Methylorubrum_265                    -0.26330012 0.3185052
## Methylobacterium_Methylorubrum_32                      0.26322039 0.2252886
## Paracoccus_206                                         0.25977015 0.3388373
## Acinetobacter_lwoffii_175                              0.25832558 0.2175327
## Haemophilus_114                                       -0.25781827 0.3181051
## Limnobacter_thiooxidans_236                           -0.25773579 0.2892132
## Dietzia_timorensis_339                                -0.25773579 0.2892132
## Stenotrophomonas_115                                   0.25647969 0.4029119
## Caulobacteraceae_182                                  -0.25422695 0.3679042
## Meiothermus_58                                         0.25407361 0.8549798
## Flavihumibacter_165                                    0.24028947 0.3374419
## Brachybacterium_200                                    0.22945425 0.2135061
## Alcaligenes_60                                        -0.22830275 0.7137851
## Cupriavidus_78                                        -0.22809320 0.6262700
## Sphingopyxis_48                                        0.21997923 0.6154686
## Skermanella_aerolata_77                               -0.21592126 0.2523120
## Devosia_148                                           -0.21356592 0.5212149
## Micrococcaceae_212                                    -0.20745655 0.3064510
## Sphingomonas_koreensis_42                              0.20237902 0.4493712
## Sphingomonas_184                                      -0.20090915 0.3415090
## Pseudomonas_12                                        -0.19815220 0.5801575
## Gemella_213                                            0.19634746 0.2311363
## Providencia_130                                       -0.17685338 0.3344940
## Enhydrobacter_70                                      -0.17485346 0.2996333
## Xanthobacter_autotrophicus_29                          0.17333843 0.7500227
## Ellin6055_144                                         -0.17231355 0.3540088
## Dietzia_109                                           -0.17194963 0.3108814
## Frankiales_158                                        -0.16618705 0.2851664
## Pyrinomonas_207                                        0.16401343 0.3520479
## Tepidimonas_128                                       -0.16241445 0.4506103
## Micrococcus_97                                         0.16006933 0.3638308
## Bosea_211                                             -0.15475324 0.3117680
## Actinomyces_119                                        0.14715560 0.3362972
## Bosea_231                                             -0.14451722 0.2963716
## Streptococcus_90                                      -0.13811313 0.2615156
## Aquabacterium_parvum_46                               -0.13232148 0.5999027
## Nitriliruptoraceae_18                                  0.12750874 0.4058932
## Acinetobacter_79                                       0.12734598 0.3568063
## Afipia_72                                             -0.11752140 0.2419879
## Sphingobium_yanoikuyae_120                            -0.11624086 0.4855536
## Frankiales_280                                        -0.10693087 0.2524627
## Novispirillum_220                                      0.09513929 0.3586848
## Staphylococcus_17                                     -0.09155807 0.3802851
## Bdellovibrio_194                                      -0.09121743 0.9856450
## Streptococcus_34                                      -0.08702313 0.4532219
## Sphingobium_205                                       -0.08680642 0.2931058
## Escherichia/Shigella_93                               -0.08073976 0.3792433
## Roseomonas_cervicalis_243                             -0.08052496 0.3522336
## Brevundimonas_53                                      -0.07348432 0.9101201
## Delftia_21                                             0.07173230 0.6172384
## Staphylococcus_264                                    -0.06459579 0.2424957
## Neisseria_118                                         -0.05980899 0.2323873
## Halomonas_178                                         -0.05980899 0.2323873
## Geodermatophilus_234                                  -0.05980899 0.2323873
## Thiobacillus_thioparus_49                             -0.05158705 0.5022265
## Stenotrophomonas_277                                  -0.04758952 0.2083868
## Bacteriovorax_stolpii_38                               0.04666569 0.4304405
## Bradyrhizobium_24                                     -0.04238205 0.4586196
## Sphingopyxis_122                                       0.03910748 0.5056904
## Tepidiphilus_succinatimandens_106                     -0.03374016 0.4866658
## Rhodococcus_221                                       -0.03066735 0.3883301
## Alloprevotella_219                                    -0.02840283 0.1779659
## Ottowia_14                                             0.02387621 0.3309215
## Caulobacteraceae_92                                    0.01619369 0.4943984
## Halomonas_94                                           0.01446747 0.3370576
##                                                           pvalues adjPvalues
## Cloacibacterium_56                                    0.001200564  0.1375103
## Vulcaniibacterium_139                                 0.018362584  0.3259359
## Corynebacterium_35                                    0.001936764  0.1375103
## Moraxella_37                                          0.003378885  0.1599339
## Pseudomonas_86                                        0.078654913  0.8285124
## Blastomonas_131                                       0.238188520  0.8285124
## Microbacteriaceae_71                                  0.010801690  0.3067680
## Aquabacterium_47                                      0.116865285  0.8285124
## Dolosigranulum_pigrum_30                              0.031033690  0.4406784
## Pseudomonas_33                                        0.206170031  0.8285124
## Meiothermus_silvanus_16                               0.099251539  0.8285124
## Sphingomonas_koreensis_116                            0.275477029  0.8285124
## Corynebacterium_62                                    0.010121558  0.3067680
## Burkholderia_Caballeronia_Paraburkholderia_55         0.015265201  0.3259359
## Stenotrophomonas_129                                  0.017868186  0.3259359
## Bosea_vestrisii_39                                    0.207502197  0.8285124
## Bosea_36                                              0.151264746  0.8285124
## Gammaproteobacteria_226                               0.024987297  0.3942440
## Proteus_89                                            0.317068408  0.8285124
## Pseudomonas_105                                       0.403612618  0.8285124
## Bosea_73                                              0.220872362  0.8285124
## Reyranella_massiliensis_110                           0.360775214  0.8285124
## Corynebacterium_44                                    0.123963468  0.8285124
## Candidatus_Paracaedibacter_150                        0.111143885  0.8285124
## Fluviicola_76                                         0.227725136  0.8285124
## Phenylobacterium_muchangponense_40                    0.150178962  0.8285124
## Corynebacterium_59                                    0.225818488  0.8285124
## Cupriavidus_gilardii_67                               0.300338918  0.8285124
## PMMR1_132                                             0.240527366  0.8285124
## Brevundimonas_20                                      0.309706048  0.8285124
## Azospirillum_15                                       0.309186934  0.8285124
## Staphylococcus_51                                     0.220794221  0.8285124
## Achromobacter_43                                      0.144330612  0.8285124
## Thermus_3                                             0.326713174  0.8285124
## Methylobacillus_98                                    0.265580145  0.8285124
## Tepidiphilus_232                                      0.183758814  0.8285124
## Comamonadaceae_7                                      0.375713424  0.8285124
## Schlegelella_4                                        0.399708795  0.8285124
## Caulobacter_272                                       0.239624385  0.8285124
## Ralstonia_121                                         0.091764495  0.8285124
## Lawsonella_clevelandensis_143                         0.167673930  0.8285124
## Streptococcus_69                                      0.301543118  0.8285124
## Phreatobacter_oligotrophus_186                        0.277262835  0.8285124
## Sphingobium_11                                        0.463482971  0.8737878
## Brevundimonas_126                                     0.548257784  0.8836291
## Brevundimonas_74                                      0.330075312  0.8285124
## Asticcacaulis_excentricus_117                         0.591168888  0.8906458
## Legionella_lytica_244                                 0.244411711  0.8285124
## Brevundimonas_28                                      0.366798217  0.8285124
## Ralstonia_66                                          0.209614743  0.8285124
## Brachymonas_75                                        0.486904354  0.8737878
## Klebsiella_245                                        0.174494763  0.8285124
## Granulicatella_167                                    0.151869684  0.8285124
## Vulcaniibacterium_thermophilum_321                    0.252025799  0.8285124
## Paucibacter_19                                        0.510256187  0.8760700
## Mesorhizobium_294                                     0.171553223  0.8285124
## Methylobacterium_Methylorubrum_13                     0.315458143  0.8285124
## Streptococcus_216                                     0.156771841  0.8285124
## Aquabacterium_52                                      0.468628686  0.8737878
## Brevundimonas_124                                     0.390572579  0.8285124
## Curvibacter_2                                         0.515604067  0.8760700
## Caulobacter_6                                         0.521293246  0.8760700
## Acinetobacter_100                                     0.408105519  0.8285124
## Sphingomonadaceae_84                                  0.493185140  0.8737878
## Allorhizobium_Neorhizobium_Pararhizobium_Rhizobium_64 0.123934777  0.8285124
## Bosea_9                                               0.538382186  0.8836291
## Sphingomonas_141                                      0.311658196  0.8285124
## Massilia_111                                          0.339509834  0.8285124
## Alphaproteobacteria_187                               0.398117098  0.8285124
## Mesorhizobium_134                                     0.440215865  0.8622877
## DSSD61_338                                            0.339014038  0.8285124
## Acinetobacter_88                                      0.318025343  0.8285124
## Haliangium_107                                        0.492981255  0.8737878
## Methyloversatilis_23                                  0.608890248  0.8906458
## Sphingosinicella_163                                  0.570854317  0.8906458
## Blastococcus_57                                       0.390993170  0.8285124
## Comamonas_25                                          0.663056641  0.8967052
## Methylobacterium_Methylorubrum_265                    0.408421588  0.8285124
## Methylobacterium_Methylorubrum_32                     0.242657738  0.8285124
## Paracoccus_206                                        0.443288742  0.8622877
## Acinetobacter_lwoffii_175                             0.235020490  0.8285124
## Haemophilus_114                                       0.417663508  0.8353270
## Limnobacter_thiooxidans_236                           0.372842281  0.8285124
## Dietzia_timorensis_339                                0.372842281  0.8285124
## Stenotrophomonas_115                                  0.524408073  0.8760700
## Caulobacteraceae_182                                  0.489556739  0.8737878
## Meiothermus_58                                        0.766337367  0.9223425
## Flavihumibacter_165                                   0.476408246  0.8737878
## Brachybacterium_200                                   0.282510545  0.8285124
## Alcaligenes_60                                        0.749083528  0.9223425
## Cupriavidus_78                                        0.715701899  0.9223425
## Sphingopyxis_48                                       0.720779310  0.9223425
## Skermanella_aerolata_77                               0.392124560  0.8285124
## Devosia_148                                           0.681992013  0.9050735
## Micrococcaceae_212                                    0.498428249  0.8737878
## Sphingomonas_koreensis_42                             0.652450568  0.8967052
## Sphingomonas_184                                      0.556332164  0.8836291
## Pseudomonas_12                                        0.732690326  0.9223425
## Gemella_213                                           0.395610030  0.8285124
## Providencia_130                                       0.597000287  0.8906458
## Enhydrobacter_70                                      0.559517597  0.8836291
## Xanthobacter_autotrophicus_29                         0.817228639  0.9223425
## Ellin6055_144                                         0.626435931  0.8906458
## Dietzia_109                                           0.580192518  0.8906458
## Frankiales_158                                        0.560046643  0.8836291
## Pyrinomonas_207                                       0.641298657  0.8967052
## Tepidimonas_128                                       0.718523943  0.9223425
## Micrococcus_97                                        0.659969386  0.8967052
## Bosea_211                                             0.619631230  0.8906458
## Actinomyces_119                                       0.661693617  0.8967052
## Bosea_231                                             0.625817820  0.8906458
## Streptococcus_90                                      0.597411985  0.8906458
## Aquabacterium_parvum_46                               0.825426042  0.9223425
## Nitriliruptoraceae_18                                 0.753412001  0.9223425
## Acinetobacter_79                                      0.721162837  0.9223425
## Afipia_72                                             0.627215381  0.8906458
## Sphingobium_yanoikuyae_120                            0.810796496  0.9223425
## Frankiales_280                                        0.671893179  0.9000833
## Novispirillum_220                                     0.790820881  0.9223425
## Staphylococcus_17                                     0.809739854  0.9223425
## Bdellovibrio_194                                      0.926264299  0.9582237
## Streptococcus_34                                      0.847734378  0.9331650
## Sphingobium_205                                       0.767107330  0.9223425
## Escherichia/Shigella_93                               0.831407302  0.9223425
## Roseomonas_cervicalis_243                             0.819170231  0.9223425
## Brevundimonas_53                                      0.935647658  0.9582237
## Delftia_21                                            0.907482226  0.9582237
## Staphylococcus_264                                    0.789947237  0.9223425
## Neisseria_118                                         0.796894918  0.9223425
## Halomonas_178                                         0.796894918  0.9223425
## Geodermatophilus_234                                  0.796894918  0.9223425
## Thiobacillus_thioparus_49                             0.918187826  0.9582237
## Stenotrophomonas_277                                  0.819357776  0.9223425
## Bacteriovorax_stolpii_38                              0.913667462  0.9582237
## Bradyrhizobium_24                                     0.926370548  0.9582237
## Sphingopyxis_122                                      0.938357179  0.9582237
## Tepidiphilus_succinatimandens_106                     0.944727573  0.9582237
## Rhodococcus_221                                       0.937054588  0.9582237
## Alloprevotella_219                                    0.873198526  0.9538015
## Ottowia_14                                            0.942481999  0.9582237
## Caulobacteraceae_92                                   0.973870488  0.9738705
## Halomonas_94                                          0.965763052  0.9726124

7.2.5 Top 20 Taxa

7.2.5.1 Run 514

# Select results of top 20 most abundant taxa in run 514
top20_514_names <- as.vector(mean_ab_groups_str_514$ASV)

VP.df_top20_514 <- subset(VP.df_514, row.names(VP.df_514) %in% top20_514_names)
VP.df_top20_514
##                                        logFC        se      pvalues
## Lactococcus_31                     2.2310383 0.4736054 2.468027e-06
## Thermus_thermophilus_10            1.9764756 0.6293105 1.685446e-03
## Tepidimonas_1                      1.8755051 0.7644720 1.415390e-02
## Thermus_5                          1.3578675 0.6867630 4.801906e-02
## Staphylococcus_17                 -1.2501553 0.5586200 2.522527e-02
## Sphingomonas_8                    -1.1970020 0.4291661 5.284911e-03
## Methylobacterium_Methylorubrum_32 -1.1230538 0.6731775 9.525863e-02
## Paucibacter_19                    -1.0335310 0.6262404 9.886639e-02
## Rhodopseudomonas_41               -0.9425102 0.7241649 1.930829e-01
## Delftia_21                        -0.9155409 0.7117670 1.983408e-01
## Streptococcus_34                   0.8072550 0.6340360 2.029469e-01
## Thermus_3                          0.5739714 0.6114840 3.479088e-01
## Methylobacterium_Methylorubrum_13  0.5302971 0.3762302 1.586869e-01
## Methylobacterium_Methylorubrum_26  0.5024263 0.8474632 5.532755e-01
## Noviherbaspirillum_suwonense_27   -0.3902677 0.4170381 3.493720e-01
## Corynebacterium_35                 0.3628948 0.6423301 5.720968e-01
## Pseudomonas_12                     0.3503039 0.3352417 2.960556e-01
## Bradyrhizobium_24                  0.2784406 0.5499671 6.126560e-01
## Methylobacterium_Methylorubrum_22  0.1833559 0.4372586 6.749747e-01
## Nitriliruptoraceae_18              0.1250221 0.5611269 8.236870e-01
##                                     adjPvalues
## Lactococcus_31                    0.0001530177
## Thermus_thermophilus_10           0.0345530232
## Tepidimonas_1                     0.1096926883
## Thermus_5                         0.2174782868
## Staphylococcus_17                 0.1457597808
## Sphingomonas_8                    0.0546107460
## Methylobacterium_Methylorubrum_32 0.2918912444
## Paucibacter_19                    0.2918912444
## Rhodopseudomonas_41               0.4338865302
## Delftia_21                        0.4338865302
## Streptococcus_34                  0.4338865302
## Thermus_3                         0.5700280019
## Methylobacterium_Methylorubrum_13 0.3935433931
## Methylobacterium_Methylorubrum_26 0.7298527527
## Noviherbaspirillum_suwonense_27   0.5700280019
## Corynebacterium_35                0.7302640407
## Pseudomonas_12                    0.5695536810
## Bradyrhizobium_24                 0.7447974708
## Methylobacterium_Methylorubrum_22 0.8047774842
## Nitriliruptoraceae_18             0.9285199014

7.2.6 Run 523

# Select top 20 most abundant taxa in run 523
top20_523_names <- as.vector(mean_ab_groups_str_523$ASV)

VP.df_top20_523 <- subset(VP.df_523, row.names(VP.df_523) %in% top20_523_names)
VP.df_top20_523
##                                     logFC        se    pvalues adjPvalues
## Meiothermus_silvanus_16       -0.97556696 0.5917932 0.09925154  0.8285124
## Bosea_vestrisii_39            -0.80212122 0.6363700 0.20750220  0.8285124
## Brevundimonas_20              -0.60038947 0.5910282 0.30970605  0.8285124
## Azospirillum_15               -0.59212002 0.5822626 0.30918693  0.8285124
## Thermus_3                     -0.56610483 0.5772128 0.32671317  0.8285124
## Comamonadaceae_7              -0.52090284 0.5880446 0.37571342  0.8285124
## Schlegelella_4                -0.47861219 0.5683276 0.39970880  0.8285124
## Sphingobium_11                -0.41816359 0.5703861 0.46348297  0.8737878
## Brevundimonas_28               0.41228079 0.4568274 0.36679822  0.8285124
## Paucibacter_19                 0.39172763 0.5949340 0.51025619  0.8760700
## Curvibacter_2                 -0.37351655 0.5745202 0.51560407  0.8760700
## Caulobacter_6                 -0.37083362 0.5782050 0.52129325  0.8760700
## Bosea_9                       -0.35081976 0.5701964 0.53838219  0.8836291
## Methyloversatilis_23          -0.29898092 0.5843372 0.60889025  0.8906458
## Comamonas_25                  -0.26871599 0.6167498 0.66305664  0.8967052
## Pseudomonas_12                -0.19815220 0.5801575 0.73269033  0.9223425
## Xanthobacter_autotrophicus_29  0.17333843 0.7500227 0.81722864  0.9223425
## Staphylococcus_17             -0.09155807 0.3802851 0.80973985  0.9223425
## Bacteriovorax_stolpii_38       0.04666569 0.4304405 0.91366746  0.9582237
## Ottowia_14                     0.02387621 0.3309215 0.94248200  0.9582237

7.2.7 Volcano Plot

# Plot Samples from run 514 as to microbes appear to be differentially abundant
EnhancedVolcano(VP.df_514,lab = rownames(VP.df_514),x = 'logFC',y = 'adjPvalues', selectLab = c("Moraxella_37","Brevundimonas_149", "Corynebacterium_44", "Lactococcus_31"), pointSize = 3.0, labSize = 5, labhjust = 0.75, pCutoff = .05, xlim = c(-7, 7), gridlines.major = TRUE, cutoffLineWidth = 0.2,cutoffLineCol = 'grey30', FCcutoff = 2)+
  ggsave("VolcanoPlot_fitFeatureModel.tiff", units="in", width=8, height=6, dpi=300, compression = 'lzw')

### Boxplot of these taxa

otu_DAT2 <- select(as.data.frame(t(otu_table_ord_RA)), "Moraxella_37","Brevundimonas_149", "Corynebacterium_44", "Lactococcus_31")
otu_DAT2 <- t(otu_DAT2)

boxplot.dfT_DAT2 <- cbind(data.frame(Sample.ID=rownames(sample_data(ps_filtered))), t(otu_DAT2) %>%
                     data.frame(check.names = F)) %>%
                       gather(key=ASV, value=RA, -Sample.ID) %>%
                       mutate(ASV = factor(ASV, levels = rev(unique(ASV))))

boxplot.dfT_DAT2$Sample_group<-Sample_group[match(boxplot.dfT_DAT2$Sample.ID, names(Sample_group))]

boxplot.dfT_DAT2 <- boxplot.dfT_DAT2 %>%
  mutate(RA_percentage=RA*100)%>%
  mutate(log10_RA=log10(RA_percentage+1))
  
pd = position_dodge(width = 0.5) 

ggplot(data = boxplot.dfT_DAT2, aes(x=ASV, y=log10_RA, fill=Sample_group))+
  stat_boxplot(geom = "errorbar", position = pd, width = 0.25)+
  geom_boxplot(width = 0.5, position = pd)+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Log10(Relative abundance)")+
  xlab("ASV")+
  labs(fill= "Sample Type")+
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "right") +
  #ggtitle("Relative Abunance of Differentially Abundant ASVs
          #from Miseq Run No. 514")
  theme_bw()+
  ggsave("Relative_abundances_Boxplot_DiffAbundance514.pdf", units="in", width=8, height=3, dpi=300)

7.2.8 Relative Abundance Table

DAT_RA.df <- boxplot.dfT_DAT2 %>%
  group_by(ASV, Sample_group) %>%
  summarise_each(funs(mean)) %>%
  select(ASV, Sample_group, RA_percentage, log10_RA)
## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA

## Warning in mean.default(Sample.ID): argument is not numeric or logical:
## returning NA
print(xtable(DAT_RA.df, digits = 3, type = "latex"), include.rownames=FALSE, file = "DAT_RA.tex")

7.2.9 Heatmap of Differentially abundant taxa

ps_DAT2 <- subset_taxa(ps_filtered, ASV=="Corynebacterium_44"|ASV=="Lactococcus_31"|ASV=="Moraxella_37"|ASV=="Brevundimonas_149"|ASV=="Pseudomonas_12"|ASV=="Brevundimonas_20")
ps_DAT2 <- prune_samples(sample_sums(ps_DAT2)>0, ps_DAT2)

plot_heatmap(ps_DAT2, "NMDS", "bray", "Sample_type", low="#4ada85", high="#4f5dd1", na.value="white", sample.order = "Sample_type")+
  labs(x="Sample_type", y="ASV")+
  theme_bw()+
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom")
## Warning: Transformation introduced infinite values in discrete y-axis

  ggsave("Abundance_Heatmap_514.pdf")
## Warning: Transformation introduced infinite values in discrete y-axis
plot_heatmap(ps_filtered, "NMDS", "bray", "Sample_type", "Family", low="#4ada85", high="#4f5dd1", na.value="white", sample.order = "Sample_type")+
  labs(x="Sample_type", y="Phyla")+
  theme_bw()+
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom")
## Warning: Transformation introduced infinite values in discrete y-axis

  #ggsave("Abundance_Heatmap_514.pdf")

7.2.10 Prevalence of Lactococcus

# Absolute abundance of Lactococcus 
otu_Lac <- as.data.frame(t(otu_table(ps_filtered)))%>%
  select(Lactococcus_31)

otu_Lac <- t(otu_Lac)

barplot.dfT_Lac <- cbind(data.frame(Sample.ID=rownames(sample_data(ps_filtered))), t(otu_Lac) %>%
                     data.frame(check.names = F)) %>%
                       gather(key=ASV, value=Absolute_Abund, -Sample.ID) %>%
                       mutate(ASV = factor(ASV, levels = rev(unique(ASV))))

barplot.dfT_Lac$Sample_group<-Sample_group[match(barplot.dfT_Lac$Sample.ID, names(Sample_group))]

barplot.dfT_Lac$Extraction_Date<-metadata_filtered$Extraction_date

barplot.dfT_Lac$Extraction_No<-metadata_filtered$Extracno

barplot.dfT_Lac <- barplot.dfT_Lac %>%
  mutate(Sample_name = fct_reorder(Sample.ID, Extraction_Date))

ggplot(data = barplot.dfT_Lac, aes(x=Extraction_Date, y=Absolute_Abund, fill = Sample_group))+
  geom_bar(stat = "identity")+
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom")+
  ylab("Absolute Abundance")+
  xlab("Sample")

Not properly arranged by date.

7.2.11 Abundance over time

barplot.dfT_Lac2 <- barplot.dfT_Lac %>%
  filter(Sample_group=="stgg") %>%
  arrange(Extraction_Date) %>%
  mutate(Sample_name = fct_reorder(Sample.ID, Extraction_Date))

ggplot(data = barplot.dfT_Lac2, aes(x=Sample_name, y=Absolute_Abund, fill = Sample_group))+
  geom_bar(stat = "identity")+
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom")+
  ylab("Absolute Abundance")+
  xlab("Sample")+
  ggtitle("Absolute Abundance of Lactococcus_31 Arranged by Extraction Date")

### Abundance in each extraction number

ggplot(data = barplot.dfT_Lac2, aes(x=Sample_name, y=Absolute_Abund, fill = as.factor(Extraction_No)))+
  geom_bar(stat = "identity")+
  theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom")+
  ylab("Absolute Abundance")+
  xlab("Sample")+
  scale_fill_discrete(name = "Extraction No.")+
  ggsave("STGG_samplesbydate.pdf", units="in", width=8, height=5, dpi=300)

#### Mean Absolute Abundance

mean(barplot.dfT_Lac2$Absolute_Abund)
## [1] 26.55

7.2.11.1 Mean Relative Abundance

# Filter Lactococcus_31
Lac.df <- filter(boxplot.dfT_DAT2, ASV=="Lactococcus_31")

mean(Lac.df$RA_percentage)
## [1] 0.4620817
# What percentage of samples contained Lactococcus_31
Lac.df$Lac_present <- Lac.df$RA>0
sum(Lac.df$Lac_present)/nrow(Lac.df)*100
## [1] 32.07547
sum(Lac.df$Lac_present)
## [1] 17
sum(Lac.df$Lac_present)/nrow(boxplot.dfT_DAT2)*100
## [1] 8.018868
Lac.df.prev = Lac.df %>%
  count(Sample_group, Lac_present) %>%
  filter(Lac_present==TRUE)

Sample_type_N <- Lac.df %>%
  count(Sample_group)%>%
  rename(Total=n)%>%
  filter(grepl('stgg', Sample_group))

Lac.df.prev$Total <- Sample_type_N$Total
Lac.df.prev = Lac.df %>%
  count(Sample_group, Lac_present) %>%
  filter(Lac_present==TRUE)


Lac.df.prev$Total <- "20"

Lac.df.prev <- Lac.df.prev %>%
  mutate(Prevalence = (n/20)*100) %>%
  mutate(Lower=as.numeric(c("21.04")))%>%
  mutate(Upper=as.numeric(c("9.76")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper)


  
# Bar Plot Showing prevalence of Strep
ggplot(data = Lac.df.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2, position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Streptococcus in STGG, RNA Protect
          and Enivornmental Control Samples")#+

  #ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

8 Are ASVs from Streptococcus and Staphylococcus genus more abundant in STGG?

# Agglomerate at genus level
ps_SS_genus = tax_glom(ps_filtered, taxrank = "Genus")

#Extract OTUs at Genus level
otu_SS_genus <- ps_SS_genus%>%
  otu_table%>%
  as("matrix")%>%
  magrittr::set_rownames(paste(tax_table(ps_SS_genus)[,"Genus"], seq(1:length(tax_table(ps_SS_genus)[,"Genus"])), sep = "_"))%>%
  data.frame(.)

##Convert into RA
otu_SS_RA <- t(otu_SS_genus)/colSums(otu_SS_genus)

otu_SS_RA <- t(select(as.data.frame(otu_SS_RA), "Staphylococcus_14", "Streptococcus_25"))

boxplot.SS_RA <- cbind(data.frame(Sample.ID=rownames(metadata_filtered)), t(otu_SS_RA))%>% 
  data.frame(check.names = F)%>%
  gather(key=Genus, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(Genus, levels = rev(unique(Genus))))


boxplot.SS_RA$Sample_group <- Sample_group[match(boxplot.SS_RA$Sample.ID, names(Sample_group))]

boxplot.SS_RA <- boxplot.SS_RA %>%
  mutate(RA_percentage=RA*100)%>%
  mutate(log10_RA=log10(RA+1))%>%
  mutate(sqrt_RA=sqrt(RA))

8.1 What Proportion of samples contained Staph/Strep

boxplot.SS_RA$SS_present <- boxplot.SS_RA$RA>0
sum(boxplot.SS_RA$SS_present)/nrow(boxplot.SS_RA)*100
## [1] 58.49057

58.5% of samples contained Staphylococcus or Streptococcus or Staphylococcus.

8.2 Prevalence of Streptococcus in each sample type

Strep <- filter(boxplot.SS_RA, ASV == "Streptococcus_25")
sum(Strep$SS_present)
## [1] 25
sum(Strep$SS_present)/nrow(boxplot.SS_RA)*100
## [1] 23.58491
Strep.prev = Strep %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Sample_type_N <- Strep %>%
  count(Sample_group)%>%
  rename(Total=n)

Strep.prev$Total <- Sample_type_N$Total

Strep.prev <- Strep.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("16.03", "18.86", "21.71")))%>%
  mutate(Upper=as.numeric(c("19.01", "30.56", "16.88")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper)


  
# Bar Plot Showing prevalence of Strep
ggplot(data = Strep.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Streptococcus in STGG, RNA Protect
          and Enivornmental Control Samples")+
  ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

Prevalence, defined as the percentage of total samples from each sample type that contained Streptococcus. Streptococcus was present in 65% of STGG samples, 28.6% of RNA Protect samples and 38.5% of environmental control samples.

8.3 Prevalence of Staphylococcus in each sample type

Staph <- filter(boxplot.SS_RA, ASV == "Staphylococcus_14")
sum(Staph$SS_present)
## [1] 37
sum(Staph$SS_present)/nrow(boxplot.SS_RA)*100
## [1] 34.90566
Staph.prev = Staph %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Staph.prev$Total <- Sample_type_N$Total

Staph.prev <- Staph.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("19.16", "37.02", "21.34")))%>%
  mutate(Upper=as.numeric(c("13.22", "11.72", "18.12")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper)


  
# Bar Plot Showing prevalence of Staph
ggplot(data = Staph.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Staphylococcus in STGG, RNA Protect 
          and Enivornmental Control Samples")+
  ggsave("Prevanlence_Staph_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

## Relative Abundance of Staphylococcus and Stretococcus

#boxplot.SS_RA_T <- filter(boxplot.SS_RA, SS_present==TRUE)

hist(boxplot.SS_RA$RA_percentage)

hist(boxplot.SS_RA$log10_RA)

ggplot(data = boxplot.SS_RA, aes(x=ASV, y=log10_RA, fill=Sample_group))+
  stat_boxplot(geom = "errorbar", position = pd, width = 0.25)+
  geom_boxplot(width = 0.5, position = pd)+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  #geom_dotplot(binaxis = 'y', stackdir='center', dotsize = 1)+
  #geom_jitter(shape=16, position=position_jitter(0.2))+
  ggtitle("Relative Abundance of Streptococcus and Staphylococcus
          in STGG, RNA protect and Environmental Controls")+
  ylab("log10(Relative abundance)")+
  xlab("ASV")+
  #theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom") +
  ggsave("Relative_abundances_Boxplot_SS_RA.tiff", units="in", width=6, height=4, dpi=300, compression = 'lzw')

## Check Statistical Significance

Strep_T <- filter(Strep, SS_present==TRUE)


library(pscl)

shapiro.test(Strep$log10_RA)
## 
##  Shapiro-Wilk normality test
## 
## data:  Strep$log10_RA
## W = 0.39633, p-value = 1.952e-13
ss1 <- glm(log10_RA ~ Sample_group, family = poisson, Strep)
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.065752
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.061572
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.026170
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.004942
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.010290
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.020370
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.004466
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.001945
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.003771
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.007126
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.004203
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.001848
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.005816
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.005741
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.001269
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.003208
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.002308
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.002367
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.000691
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.000939

## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.000939
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.006214
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.000510
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.001190
## Warning in dpois(y, mu, log = TRUE): non-integer x = 0.002555
plot(ss1)

summary(ss1)
## 
## Call:
## glm(formula = log10_RA ~ Sample_group, family = poisson, data = Strep)
## 
## Deviance Residuals: 
##      Min        1Q    Median        3Q       Max  
## -0.11439  -0.11439  -0.08507  -0.00409   0.43017  
## 
## Coefficients:
##                         Estimate Std. Error z value Pr(>|z|)  
## (Intercept)              -5.0295     2.4247  -2.074   0.0381 *
## Sample_grouprna_protect  -2.5038    16.5193  -0.152   0.8795  
## Sample_groupstgg         -0.5923     4.4383  -0.133   0.8938  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for poisson family taken to be 1)
## 
##     Null deviance: 0.81035  on 52  degrees of freedom
## Residual deviance: 0.74622  on 50  degrees of freedom
## AIC: Inf
## 
## Number of Fisher Scoring iterations: 9
Staph_T <- filter(Staph, SS_present==TRUE)
ss2 <- zeroinfl(log10_RA ~ Sample_group, family = poisson, Staph)
## Error in zeroinfl(log10_RA ~ Sample_group, family = poisson, Staph): invalid dependent variable, non-integer values
plot(ss2)
## Error in plot(ss2): object 'ss2' not found
summary(ss2)
## Error in h(simpleError(msg, call)): error in evaluating the argument 'object' in selecting a method for function 'summary': object 'ss2' not found
ss3 <- aov(log10_RA ~ Sample_group+ASV, boxplot.SS_RA_T)
## Error in terms.formula(formula, "Error", data = data): object 'boxplot.SS_RA_T' not found
ss3
## Error in eval(expr, envir, enclos): object 'ss3' not found

Relative abundance could not be transformed to normal distribution so Kruskal-Wallis test (non-parametric) was used to determine the statistical significance of any difference in RA between sample types. No significant difference was observed between

9 Staph/Strep ASVs

OTU9<- as(otu_table(ps_filtered), "matrix")
OTU9 <- OTU9[rowSums(t(t(OTU8)/colSums(OTU9))>=0.001)>1, ]
## Warning in t(OTU8)/colSums(OTU9): longer object length is not a multiple of
## shorter object length
otu_table_ord9<-OTU9[order(-rowSums(OTU9)), ]
otu_table_ord_RA9 <- t(t(otu_table_ord9)/colSums(otu_table_ord9))
otu_table_ord_RA9 <- as.data.frame(otu_table_ord_RA9)

otu_SS_ASV <- filter(otu_table_ord_RA9, grepl('Staphylococcus|Streptococcus', row.names(otu_table_ord_RA9)))

9.1 Prevalence

boxplot.SS_RA2 <- cbind(data.frame(Sample.ID=rownames(metadata_filtered)), t(otu_SS_ASV))%>% 
  data.frame(check.names = F)%>%
  gather(key=ASV, value=RA, -Sample.ID) %>% 
  mutate(ASV = factor(ASV, levels = rev(unique(ASV))))


boxplot.SS_RA2$Sample_group <- Sample_group[match(boxplot.SS_RA2$Sample.ID, names(Sample_group))]

boxplot.SS_RA2 <- boxplot.SS_RA2 %>%
  mutate(RA_percentage=RA*100)%>%
  mutate(log10_RA=log10(RA+1))%>%
  mutate(sqrt_RA=sqrt(RA))

9.1.1 What percetage of samples contained Staph or Strep

boxplot.SS_RA2$SS_present <- boxplot.SS_RA2$RA>0
sum(boxplot.SS_RA2$SS_present)/nrow(boxplot.SS_RA2)*100 #not correct
## [1] 16.03774

9.1.2 Staphylococcus_17

Sta17 <- filter(boxplot.SS_RA2, ASV == "Staphylococcus_17")
sum(Sta17$SS_present)
## [1] 33
sum(Sta17$SS_present)/nrow(boxplot.SS_RA2)*100
## [1] 7.783019
Sta17.prev = Sta17 %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Sample_type_N <- Sta17 %>%
  count(Sample_group)%>%
  rename(Total=n)

Sta17.prev$Total <- Sample_type_N$Total
Sta17.prev$ASV <- "Staphylococcus_17"

Sta17.prev <- Sta17.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("19.00846", "37.02429", "20.79")))%>%
  mutate(Upper=as.numeric(c("16.03154", "11.71571", "21.62")))%>%
  mutate(not_present=Total-n)%>%
  select(Sample_group, n, not_present, Total, Prevalence, Lower, Upper, ASV)

# Is prevalence of each sample group independent or related
sta17.prop <- prop.test(x=Sta17.prev$n, n=Sta17.prev$Total, conf.level = 0.95, correct = FALSE)
## Warning in prop.test(x = Sta17.prev$n, n = Sta17.prev$Total, conf.level =
## 0.95, : Chi-squared approximation may be incorrect
sta17.prop
## 
##  3-sample test for equality of proportions without continuity
##  correction
## 
## data:  Sta17.prev$n out of Sta17.prev$Total
## X-squared = 2.0933, df = 2, p-value = 0.3511
## alternative hypothesis: two.sided
## sample estimates:
##    prop 1    prop 2    prop 3 
## 0.6153846 0.8571429 0.5500000
# Bar Plot Showing prevalence of Sta17
ggplot(data = Sta17.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Streptococcus_17 in STGG, RNA Protect
          and Enivornmental Control Samples")#+

  #ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

9.1.3 Streptococcus_34

Str34 <- filter(boxplot.SS_RA2, ASV == "Streptococcus_34")
sum(Str34$SS_present)
## [1] 13
sum(Str34$SS_present)/nrow(boxplot.SS_RA2)*100
## [1] 3.066038
Str34.prev = Str34 %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Sample_type_N <- Str34 %>%
  count(Sample_group)%>%
  rename(Total=n)

Str34.prev$Total <- Sample_type_N$Total
Str34.prev$ASV <- "Streptococcus_34"

Str34.prev <- Str34.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("7.53846", "11.71571", "19.18")))%>%
  mutate(Upper=as.numeric(c("17.44154", "37.02429", "20.79")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper, ASV)

# Is prevalence of each sample group independent or related
chisq.test(Str34$Sample_group, Str34$SS_present) #ns
## Warning in chisq.test(Str34$Sample_group, Str34$SS_present): Chi-squared
## approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  Str34$Sample_group and Str34$SS_present
## X-squared = 7.2944, df = 2, p-value = 0.02606
str34.prop <- prop.test(x=Str34.prev$n, n=Str34.prev$Total,  conf.level = 0.95, correct = FALSE)
## Warning in prop.test(x = Str34.prev$n, n = Str34.prev$Total, conf.level =
## 0.95, : Chi-squared approximation may be incorrect
str34.prop
## 
##  3-sample test for equality of proportions without continuity
##  correction
## 
## data:  Str34.prev$n out of Str34.prev$Total
## X-squared = 7.2944, df = 2, p-value = 0.02606
## alternative hypothesis: two.sided
## sample estimates:
##    prop 1    prop 2    prop 3 
## 0.1153846 0.1428571 0.4500000
str34.PW <- pairwise.prop.test(x=Str34.prev$n, n=Str34.prev$Total, p.adjust.method = "BH")
## Warning in prop.test(x[c(i, j)], n[c(i, j)], ...): Chi-squared approximation may
## be incorrect
## Warning in prop.test(x[c(i, j)], n[c(i, j)], ...): Chi-squared approximation may
## be incorrect
str34.PW
## 
##  Pairwise comparisons using Pairwise comparison of proportions 
## 
## data:  Str34.prev$n out of Str34.prev$Total 
## 
##   1     2    
## 2 1.000 -    
## 3 0.079 0.481
## 
## P value adjustment method: BH
print(xtable(str34.PW$p.value, type = "latex", digits = 3), file = "Str34.prev_pairwise.tex")

# Bar Plot Showing prevalence of Str34
ggplot(data = Str34.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Streptococcus_34 in STGG, RNA Protect
          and Enivornmental Control Samples")#+

  #ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

9.1.4 Staphylococcus_51

Sta51 <- filter(boxplot.SS_RA2, ASV == "Staphylococcus_51")
sum(Sta51$SS_present)
## [1] 4
sum(Sta51$SS_present)/nrow(boxplot.SS_RA2)*100
## [1] 0.9433962
Sta51.prev = Sta51 %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Sample_type_N <- Sta51 %>%
  count(Sample_group)%>%
  rename(Total=n)%>%
  filter(grepl('stgg|blank', Sample_group))


Sta51.prev$Total <- Sample_type_N$Total
Sta51.prev$ASV <- "Staphylococcus_51"

Sta51.prev <- Sta51.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("7.53846", "4.11")))%>%
  mutate(Upper=as.numeric(c("17.44154", "18.61")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper, ASV)

sta51.prop <- prop.test(x=Sta51.prev$n, n=Sta51.prev$Total,  conf.level = 0.95, correct = FALSE)
## Warning in prop.test(x = Sta51.prev$n, n = Sta51.prev$Total, conf.level =
## 0.95, : Chi-squared approximation may be incorrect
sta51.prop
## 
##  2-sample test for equality of proportions without continuity
##  correction
## 
## data:  Sta51.prev$n out of Sta51.prev$Total
## X-squared = 0.6087, df = 1, p-value = 0.4353
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.09019268  0.22096191
## sample estimates:
##    prop 1    prop 2 
## 0.1153846 0.0500000
# Bar Plot Showing prevalence of Sta51
ggplot(data = Sta51.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Staphylococcus_51 in STGG, RNA Protect
          and Enivornmental Control Samples")#+

  #ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

9.1.5 Streptococcus_69

Str69 <- filter(boxplot.SS_RA2, ASV == "Streptococcus_69")
sum(Str69$SS_present)
## [1] 6
sum(Str69$SS_present)/nrow(boxplot.SS_RA2)*100
## [1] 1.415094
Str69.prev = Str69 %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Sample_type_N <- Str69 %>%
  count(Sample_group)%>%
  rename(Total=n)%>%
  filter(grepl('stgg|blank', Sample_group))


Str69.prev$Total <- Sample_type_N$Total
Str69.prev$ASV <- "Streptococcus_69"

Str69.prev <- Str69.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("10.72077", "4.11")))%>%
  mutate(Upper=as.numeric(c("18.64923", "18.61")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper, ASV)

str69.prop <- prop.test(x=Str69.prev$n, n=Str69.prev$Total,  conf.level = 0.95, correct = FALSE)
## Warning in prop.test(x = Str69.prev$n, n = Str69.prev$Total, conf.level =
## 0.95, : Chi-squared approximation may be incorrect
str69.prop
## 
##  2-sample test for equality of proportions without continuity
##  correction
## 
## data:  Str69.prev$n out of Str69.prev$Total
## X-squared = 2.0184, df = 1, p-value = 0.1554
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.03678042  0.32139581
## sample estimates:
##    prop 1    prop 2 
## 0.1923077 0.0500000
# Bar Plot Showing prevalence of Str69
ggplot(data = Str69.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Streptococcus_69 in STGG, RNA Protect
          and Enivornmental Control Samples")#+

  #ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

9.1.6 Streptococcus_90

Str90 <- filter(boxplot.SS_RA2, ASV == "Streptococcus_90")
sum(Str90$SS_present)
## [1] 6
sum(Str90$SS_present)/nrow(boxplot.SS_RA2)*100
## [1] 1.415094
Str90.prev = Str90 %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Sample_type_N <- Str90 %>%
  count(Sample_group)%>%
  rename(Total=n)%>%
  filter(grepl('stgg|blank', Sample_group))


Str90.prev$Total <- Sample_type_N$Total
Str90.prev$ASV <- "Streptococcus_90"

Str90.prev <- Str90.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("5.552308", "11.93")))%>%
  mutate(Upper=as.numeric(c("16.447692", "21.6")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper, ASV)

str90.prop <- prop.test(x=Str90.prev$n, n=Str90.prev$Total,  conf.level = 0.95, correct = FALSE)
## Warning in prop.test(x = Str90.prev$n, n = Str90.prev$Total, conf.level =
## 0.95, : Chi-squared approximation may be incorrect
str90.prop
## 
##  2-sample test for equality of proportions without continuity
##  correction
## 
## data:  Str90.prev$n out of Str90.prev$Total
## X-squared = 1.5097, df = 1, p-value = 0.2192
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.32611062  0.07995677
## sample estimates:
##     prop 1     prop 2 
## 0.07692308 0.20000000
# Bar Plot Showing prevalence of Str90
ggplot(data = Str90.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Streptococcus_90 in STGG, RNA Protect
          and Enivornmental Control Samples")#+

  #ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

9.1.7 Streptococcus_195

Str195 <- filter(boxplot.SS_RA2, ASV == "Streptococcus_195")
sum(Str195$SS_present)
## [1] 2
sum(Str195$SS_present)/nrow(boxplot.SS_RA2)*100
## [1] 0.4716981
Str195.prev = Str195 %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Sample_type_N <- Str195 %>%
  count(Sample_group)%>%
  rename(Total=n)%>%
  filter(grepl('stgg|blank', Sample_group))


Str195.prev$Total <- Sample_type_N$Total
Str195.prev$ASV <- "Streptococcus_195"

Str195.prev <- Str195.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("3.136154", "4.11")))%>%
  mutate(Upper=as.numeric(c("15.693846", "18.61")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper, ASV)

str195.prop <- prop.test(x=Str195.prev$n, n=Str195.prev$Total,  conf.level = 0.95, correct = FALSE)
## Warning in prop.test(x = Str195.prev$n, n = Str195.prev$Total, conf.level =
## 0.95, : Chi-squared approximation may be incorrect
str195.prop
## 
##  2-sample test for equality of proportions without continuity
##  correction
## 
## data:  Str195.prev$n out of Str195.prev$Total
## X-squared = 0.036189, df = 1, p-value = 0.8491
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.1323173  0.1092404
## sample estimates:
##     prop 1     prop 2 
## 0.03846154 0.05000000
# Bar Plot Showing prevalence of Str195
ggplot(data = Str195.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Streptococcus_195 in STGG, RNA Protect
          and Enivornmental Control Samples")#+

  #ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

9.1.8 Streptococcus_216

Str216 <- filter(boxplot.SS_RA2, ASV == "Streptococcus_216")
sum(Str216$SS_present)
## [1] 2
sum(Str216$SS_present)/nrow(boxplot.SS_RA2)*100
## [1] 0.4716981
Str216.prev = Str216 %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Sample_type_N <- Str216 %>%
  count(Sample_group)%>%
  rename(Total=n)%>%
  filter(grepl('stgg|rna_protect', Sample_group))


Str216.prev$Total <- Sample_type_N$Total
Str216.prev$ASV <- "Streptococcus_216"

Str216.prev <- Str216.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("11.71571", "4.11")))%>%
  mutate(Upper=as.numeric(c("37.02429", "18.61")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper, ASV)

str216.prop <- prop.test(x=Str216.prev$n, n=Str216.prev$Total,  conf.level = 0.95, correct = FALSE)
## Warning in prop.test(x = Str216.prev$n, n = Str216.prev$Total, conf.level =
## 0.95, : Chi-squared approximation may be incorrect
str216.prop
## 
##  2-sample test for equality of proportions without continuity
##  correction
## 
## data:  Str216.prev$n out of Str216.prev$Total
## X-squared = 0.65186, df = 1, p-value = 0.4194
## alternative hypothesis: two.sided
## 95 percent confidence interval:
##  -0.1834054  0.3691197
## sample estimates:
##    prop 1    prop 2 
## 0.1428571 0.0500000
# Bar Plot Showing prevalence of Str216
ggplot(data = Str216.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Streptococcus_216 in STGG, RNA Protect
          and Enivornmental Control Samples")#+

  #ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

9.1.9 Streptococcus_303

Str303 <- filter(boxplot.SS_RA2, ASV == "Streptococcus_303")
sum(Str303$SS_present)
## [1] 2
sum(Str303$SS_present)/nrow(boxplot.SS_RA2)*100
## [1] 0.4716981
Str303.prev = Str303 %>%
  count(Sample_group, SS_present) %>%
  filter(SS_present==TRUE)

Sample_type_N <- Str303 %>%
  count(Sample_group)%>%
  rename(Total=n)%>%
  filter(grepl('stgg', Sample_group))


Str303.prev$Total <- Sample_type_N$Total
Str303.prev$ASV <- "Streptococcus_303"

Str303.prev <- Str303.prev %>%
  mutate(Prevalence = (n/Total)*100) %>%
  mutate(Lower=as.numeric(c("7.21")))%>%
  mutate(Upper=as.numeric(c("20.1")))%>%
  select(Sample_group, n, Total, Prevalence, Lower, Upper, ASV)


  
# Bar Plot Showing prevalence of Str303
ggplot(data = Str303.prev, aes(x=Sample_group, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("Sample Type")+
  ggtitle("Prevalence of Streptococcus_303 in STGG, RNA Protect
          and Enivornmental Control Samples")#+

  #ggsave("Prevanlence_Strep_Bar.tiff", units="in", width=6, height=5, dpi=300, compression = 'lzw')

9.1.10 Combined Bar Chart of All SS ASVs

boxplot.SS.prev <- bind_rows(Sta17.prev, Sta51.prev, Str34.prev, Str69.prev, Str90.prev, Str195.prev, Str216.prev, Str303.prev, .id = NULL) %>%
  select(Sample_group, ASV, n, Prevalence, Lower, Upper)

print(xtable(boxplot.SS.prev, type = "latex", digits = 3), file = "SS_Prevalence_Table.tex")

# Bar Plot Showing prevalence
ggplot(data = boxplot.SS.prev, aes(x=ASV, y=Prevalence, fill=Sample_group))+
  geom_bar(stat = "identity", color="black", position=position_dodge()) +
  geom_errorbar(aes(ymin=Prevalence-Lower, ymax=Prevalence+Upper), width=.2,
                 position=position_dodge(.9))+
  scale_fill_manual(name = "Sample Type", label = c("Blank", "RNA protect", "STGG"), values = wes_palette(n=3, name = "FantasticFox1"))+
  ylab("Prevalence (%)")+
  xlab("ASV")+
  theme_bw()+
  theme(axis.text.x = element_text(face = "italic"))+
  #ggtitle("Prevalence of Streptococcus and Staphylococcus ASVs in STGG, RNA Protect and Enivornmental Control Samples")+
  ggsave("Prevanlence_SS_ASV_Bar.pdf", units="in", width=12, height=5, dpi=300)

9.1.11 Table of Chi Squared

ChSq <- c(sta17.prop$statistic, str34.prop$statistic, sta51.prop$statistic, str69.prop$statistic, str90.prop$statistic, str195.prop$statistic, str216.prop$statistic, NA)

SS.prev_pval <- c(sta17.prop$p.value, str34.prop$p.value, sta51.prop$p.value, str69.prop$p.value, str90.prop$p.value, str195.prop$p.value, str216.prop$p.value, NA)

SS.prev_adjpval <- p.adjust(SS.prev_pval, method = "BH")

SS_names <- c("Staphylococcus_17", "Streptococcus_34", "Staphylococcus_51", "Streptococcus_69", "Streptococcus_90", "Streptococcus_195", "Streptococcus_216", "Streptococcus_303")

SS.prev.df <- data.frame(SS_names, ChSq, SS.prev_pval, SS.prev_adjpval)

print(xtable(SS.prev.df, type = "latex", digits = 3), file = "SS_Prevalence_Pval.tex")

9.2 Relative Abundancee of Each Staph/Strep ASV

pd = position_dodge(width = 0.5) 

ggplot(data = boxplot.SS_RA2, aes(x=ASV, y=log10_RA, fill=Sample_group))+
  stat_boxplot(geom = "errorbar", position = pd, width = 0.25)+
  geom_boxplot(width = 0.5, position = pd)+
  scale_fill_manual(values = wes_palette(n=3, name = "FantasticFox1"))+
  #geom_dotplot(binaxis = 'y', stackdir='center', dotsize = 1)+
  #geom_jitter(shape=16, position=position_jitter(0.2))+
  #ggtitle("Relative Abundance of Staphylococcus and Streptococcus ASVs
          #in STGG, RNA protect and Environmental Controls")+
  ylab("log10(Relative abundance)")+
  scale_x_discrete(label=NULL)+
  facet_wrap(~ASV, scales="free")+
  theme_bw()+
  ggsave("Relative_Abundance_SS_ASV_Bar.pdf", units="in", width=8, height=5, dpi=300)

  #theme(axis.text.x=element_text(angle=90,hjust=1,vjust=0.5), legend.position = "bottom")

9.3 Statistical significance

# A series of linear models were used to compare relative abdundance of Streptococcus and STaphylococcus ASVs

RA.df_SS <- boxplot.SS_RA2

MiSeq_Run<-metadata_filtered%>%
  select(Sample, Run_No) %>% 
  deframe()

RA.df_SS$MiSeq_Run<-MiSeq_Run[match(RA.df_SS$Sample.ID, names(MiSeq_Run))]

9.3.0.1 Staphylococcus_17

sta17RA <- filter(RA.df_SS, ASV=="Staphylococcus_17")
sta17.lm <- lm(RA ~ Sample_group, data=sta17RA)
summary(sta17.lm)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = sta17RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.022779 -0.018956 -0.010740  0.001956  0.082973 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              0.019090   0.005149   3.708 0.000524 ***
## Sample_grouprna_protect  0.003689   0.011179   0.330 0.742787    
## Sample_groupstgg        -0.008350   0.007809  -1.069 0.290041    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.02625 on 50 degrees of freedom
## Multiple R-squared:  0.0313, Adjusted R-squared:  -0.007444 
## F-statistic: 0.8079 on 2 and 50 DF,  p-value: 0.4515
par(mfrow=c(2,2))
plot(sta17.lm)

#### Streptococcus_34

str34RA <- filter(RA.df_SS, ASV=="Streptococcus_34")
str34.lm <- lm(RA ~ Sample_group, data=str34RA)
summary(str34.lm)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = str34RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.005817 -0.003372 -0.003372 -0.000897  0.076628 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)              0.003372   0.002491   1.354    0.182
## Sample_grouprna_protect -0.002475   0.005409  -0.458    0.649
## Sample_groupstgg         0.002444   0.003778   0.647    0.521
## 
## Residual standard error: 0.0127 on 50 degrees of freedom
## Multiple R-squared:  0.01749,    Adjusted R-squared:  -0.02181 
## F-statistic: 0.445 on 2 and 50 DF,  p-value: 0.6433
par(mfrow=c(2,2))
plot(str34.lm)

#### Staphylococcus_51

sta51RA <- filter(RA.df_SS, ASV=="Staphylococcus_51")
sta51.lm <- lm(RA ~ Sample_group, data=sta51RA)
summary(sta51.lm)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = sta51RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.002575 -0.002575 -0.000684 -0.000684  0.048916 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)
## (Intercept)              0.0006839  0.0014227   0.481    0.633
## Sample_grouprna_protect -0.0006839  0.0030890  -0.221    0.826
## Sample_groupstgg         0.0018906  0.0021576   0.876    0.385
## 
## Residual standard error: 0.007254 on 50 degrees of freedom
## Multiple R-squared:  0.02018,    Adjusted R-squared:  -0.01902 
## F-statistic: 0.5148 on 2 and 50 DF,  p-value: 0.6008
par(mfrow=c(2,2))
plot(sta51.lm)

#### Streptococcus_69

str69RA <- filter(RA.df_SS, ASV=="Streptococcus_69")
str69.lm <- lm(RA ~ Sample_group, data=str69RA)
summary(str69.lm)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = str69RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.005725 -0.005725 -0.000229 -0.000229  0.065387 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)  
## (Intercept)              0.005725   0.002498   2.292   0.0261 *
## Sample_grouprna_protect -0.005725   0.005423  -1.056   0.2962  
## Sample_groupstgg        -0.005496   0.003788  -1.451   0.1531  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.01274 on 50 degrees of freedom
## Multiple R-squared:  0.04801,    Adjusted R-squared:  0.009934 
## F-statistic: 1.261 on 2 and 50 DF,  p-value: 0.2923
par(mfrow=c(2,2))
plot(str69.lm)

#### Streptococcus_90

str90RA <- filter(RA.df_SS, ASV=="Streptococcus_90")
str90.lm <- lm(RA ~ Sample_group, data=str90RA)
summary(str90.lm)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = str90RA)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.006019 -0.006019 -0.000825 -0.000825  0.148343 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)              0.006019   0.004204   1.432    0.158
## Sample_grouprna_protect -0.006019   0.009127  -0.659    0.513
## Sample_groupstgg        -0.005195   0.006375  -0.815    0.419
## 
## Residual standard error: 0.02143 on 50 degrees of freedom
## Multiple R-squared:  0.01674,    Adjusted R-squared:  -0.0226 
## F-statistic: 0.4255 on 2 and 50 DF,  p-value: 0.6558
par(mfrow=c(2,2))
plot(str90.lm)

#### Streptococcus_195

str195RA <- filter(RA.df_SS, ASV=="Streptococcus_195")
str195.lm <- lm(RA ~ Sample_group, data=str195RA)
summary(str195.lm)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = str195RA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0005118 -0.0005118 -0.0004359 -0.0004359  0.0108980 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)
## (Intercept)              4.359e-04  4.142e-04   1.052    0.298
## Sample_grouprna_protect -4.359e-04  8.994e-04  -0.485    0.630
## Sample_groupstgg         7.587e-05  6.282e-04   0.121    0.904
## 
## Residual standard error: 0.002112 on 50 degrees of freedom
## Multiple R-squared:  0.006242,   Adjusted R-squared:  -0.03351 
## F-statistic: 0.157 on 2 and 50 DF,  p-value: 0.8551
par(mfrow=c(2,2))
plot(str195.lm)

#### Streptococcus_216

str216RA <- filter(RA.df_SS, ASV=="Streptococcus_216")
str216.lm <- lm(RA ~ Sample_group, data=str216RA)
summary(str216.lm)
## 
## Call:
## lm(formula = RA ~ Sample_group, data = str216RA)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -0.0003901 -0.0002419  0.0000000  0.0000000  0.0045964 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)             7.446e-20  1.484e-04   0.000    1.000
## Sample_grouprna_protect 3.901e-04  3.222e-04   1.211    0.232
## Sample_groupstgg        2.419e-04  2.251e-04   1.075    0.288
## 
## Residual standard error: 0.0007567 on 50 degrees of freedom
## Multiple R-squared:  0.03877,    Adjusted R-squared:  0.0003211 
## F-statistic: 1.008 on 2 and 50 DF,  p-value: 0.3721
par(mfrow=c(2,2))
plot(str216.lm)

#### Streptococcus_301 Only found in one sample group so no linear model required

9.3.0.2 Adjusted p values

lmp <- function (modelobject) {
    if (class(modelobject) != "lm") stop("Not an object of class 'lm' ")
    f <- summary(modelobject)$fstatistic
    p <- pf(f[1],f[2],f[3],lower.tail=F)
    attributes(p) <- NULL
    return(p)
}

SS.RA_pval <- c(lmp(sta17.lm), lmp(str34.lm), lmp(sta51.lm), lmp(str69.lm), lmp(str90.lm), lmp(str195.lm), lmp(str216.lm), NA)

SS.RA_adjpval <- p.adjust(SS.RA_pval, method = "BH")

SS.RA_R2 <- c(summary(sta17.lm)$r.squared, summary(str34.lm)$r.squared, summary(sta51.lm)$r.squared, summary(str69.lm)$r.squared, summary(str90.lm)$r.squared, summary(str195.lm)$r.squared, summary(str216.lm)$r.squared, NA)

SS.RA_table <- data.frame(SS_names, SS.RA_R2, SS.RA_pval, SS.RA_adjpval)

print(xtable(SS.RA_table, type = "latex", digits = 3), file = "SS_Relative_Abundance_Linear_Model.tex")

10 Random Forest

# set random seed number
set.seed(151)
library(randomForest)

# run model
rf1 <- randomForest(t(otu_table_ord_RA), as.factor(metadata_filtered$Sample_type), ntree=1000) 

# retreive OTU importance from model
imp <- data.frame(predictors = rownames(importance(rf1)), importance(rf1))

# Order the predictor levels by importance
imp.sort <- arrange(imp, desc(MeanDecreaseGini))
imp.sort$predictors <- factor(imp.sort$predictors, levels = imp.sort$predictors)

# Select the top 10 predictors
imp.10 <- imp.sort[1:20, ]

# plot otus by decreasing importance
ggplot(imp.10, aes(x = predictors, y = MeanDecreaseGini)) +geom_bar(stat = "identity", fill = "indianred") +coord_flip()+
  theme_bw()